shekohex / allo-isolate

Run Multithreaded Rust along with Dart VM (in isolate) 🌀
Apache License 2.0
120 stars 18 forks source link

use atomic library to remove a pair of "unsafe" operations #12

Closed fzyzcjy closed 3 years ago

fzyzcjy commented 3 years ago

indeed the only change: https://github.com/sunshine-protocol/allo-isolate/commit/a056fcd7c5d4e1ae4e291a14823dc58d5447b8a5

fzyzcjy commented 3 years ago

All checks have passed.

shekohex commented 3 years ago

Is this different than the AtomicPtr in the std? I saw that crate before, but didn't want to use it because I thought it would be the same as the one in the std.

The test passes, with no issues. but in the future we would have an integration test that uses a real dart vm example and go through different tests. but that could be in another PR.

fzyzcjy commented 3 years ago

@shekohex I guess AtomicPtr, when passing a function pointer, will have compile-time error. In that issue, the person who is the author of this atomic lib said that people can use his library in that case, so I guess it is safe.