Skip to content

Refactor os_process.py and os_thread.py; they contain much common code. #14

@snim2

Description

@snim2

From old Google Code repo:

Reported by project member sschwarzer@sschwarzer.net, Jul 27, 2010

Currently, csp/os_process.py and csp/os_thread.py share a lot of code, particularly in the classes Alt, Par, Seq, Guard, Channel and FileChannel.

This means that errors in one of these files have also to be fixed in the corresponding file. It also means that features useful for one file would have to be copied to the other file etc.

Therefore, the two files should be refactored, maybe by moving the common code to a new module. It might be useful to have unittests before the refactoring is started.

Comment 1 by project member mount.sarah, Jul 27, 2010

Agreed, where possible. However, I think it may create some circular imports. For example, the Guard and Skip classes can be in csp/os_common.py and should be imported before Channel is defined, however, CSPProcess is particular to the method of process creation, so cannot be in csp/os_common.py and yet CSPProcess must be defined before Skip.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions