Skip to content

Does effectful have a policy on thread safety? #293

Answered by arybczak
tomjaguarpaw asked this question in Q&A
Discussion options

You must be logged in to vote

As far as I can tell, effectful's policy is essentially "Use either Effectful.State.Local or Effecful.State.Dynamic whenever a state effect might be used concurrently", and effectful's "copy on fork" makes this very convenient in practice, hence "make it easier to write thread-safe code than thread-unsafe code".

Yes, that's pretty much it. Correctly working primitives are there, if someone wants to reimplement them for some reason, they should know what they're doing.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tomjaguarpaw
Comment options

Answer selected by tomjaguarpaw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #292 on January 11, 2025 09:26.