amethyst / shred

Shared resource dispatcher
Apache License 2.0
234 stars 66 forks source link

Change wording in BatchController and impose Send requirements #150

Closed WaDelma closed 5 years ago

WaDelma commented 5 years ago

Because panicking is general not unsafe, changes the doc comment of BatchController::create to better match the doc comment of the trait regarding safety.

As the implementers of the trait are supposed to be Send I added the requirement explicitly.

I am still not sure why Dispatcher isn't Send, so I am not sure about the safety considerations.

WaDelma commented 5 years ago

Now that I think about it adding Send bound is probably not good idea.

WaDelma commented 5 years ago

The Send bound being bad idea is that it restricts what user can do: If they are using BatchController in single threaded environment Send bound just adds extra burden and it doesn't really add any extra value for multi threaded environment (as rust forces it to be implemented).

bors[bot] commented 5 years ago

Build succeeded