tonarino / actor

A minimalist actor framework aiming for high performance and simplicity.
MIT License
40 stars 6 forks source link

relax constraints on Send in System and SpawnBuilder #48

Closed mcginty closed 3 years ago

mcginty commented 3 years ago

On integrating the new actor system with tonari's main codebase, the type system showed more restrictiveness than was necessary, making it impossible to run an Actor on the main thread if Actor didn't implement Send (which of course is unnecessary if not being spawned on a separate thread).

bschwind commented 3 years ago

Could we get a minimal example added which would give a compiler error before this fix is added?

Edit: Just a test would be fine, too

mcginty commented 3 years ago

Added a test cc @bschwind.

It's not easy to show in this PR, but if you copy that test and run it on main it doesn't compile because of Send constraints.

strohel commented 3 years ago

I'd like to have a look at this later today, unless you want to merge quickly.