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

Flow events (+ support destructible types like refcounting in tasks) #144

Merged
merged 7 commits into from
May 17, 2020

Conversation

mratsim
Copy link
Owner

@mratsim mratsim commented May 17, 2020

This renames:

  • Pledge to FlowEvent
  • fulfill to trigger
  • spawnDelayed to spawnOnEvent and spawnOnEvents

bringing Weave more closely to asyncdispatch/Chronos, Cuda and OpenCL async event concept.
Actually pledges were the same concept which I didn't knew at the time.

Closes #135

Additionally, destructible types like those using refcounting were not properly supported in Tasks.
This was due to the Task data buffer not being zero initialized.
So if a destructor relied on a zero initialized type to do if field.isNil: return it could lead to corruption in tasks.
Now tasks are zero-initialized before use. The tradeoff is 17% overhead on fibonacci (but completely invisible on matrix multiplication).

Before:
2020-05-17_14-18
After:
2020-05-17_14-18_1

@mratsim mratsim merged commit bd797eb into master May 17, 2020
@mratsim mratsim deleted the flow-events branch May 17, 2020 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename Pledge to FlowEvent
1 participant