Skip to content

JanisErdmanis/Receive.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Receive.jl

Programming concurrent systems are hard. Go has shown that such systems become easier when expressed with select statements that enable timeouts, heartbeat, termination of workers, state machines with multiple inputs, and other sound patterns. We can also express these patterns in Erlang with a receive statement which I implemented here as follows:

using Receive: receive, Break

let

state = 0

receive(results, quit) do ch, value
    
   if ch==quit
       close(quit)
       return Break()
   end

   state = value
end

end

WARNING: This implementation is experimental and unforeseen races which lead to deadlocks are likely

Resources

About

Implementation of Erlang receive statement in Julia

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages