Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the asymmetric barrier use the initialize/construct idiom? #2

Open
lars-t-hansen opened this issue Jan 20, 2015 · 1 comment
Open

Comments

@lars-t-hansen
Copy link
Owner

The various data types in parlib-simple use the initialize/construct idiom, where the shared memory is initialized by a static function on the data type and a constructor is then used uniformly in all agents to construct objects on top of that memory. The asymmetric-barrier does not use this idiom. In some sense that is appropriate since the data type is truly asymmetric. On the other hand it creates an extra cognitive load on use (?). We should investigate the possibility of making asymmetric-barrier stick closer to the common pattern, but we could hold off on this until other asymmetric data structures make it into this library (notably lock, condition, and buffer).

@lars-t-hansen
Copy link
Owner Author

The Par object (nee Multicore), which is also asymmetric, follows asymmetric-barrier here in that it has a MasterPar constructor and a WorkerPar constructor, but no initialize method. The MasterPar constructor initializes the shared memory and transmits it to the workers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant