WLBF / single-instance

A rust library for single instance application.
MIT License
35 stars 8 forks source link

SingleInstance is not Send on Windows platform #8

Closed ancwrd1 closed 3 years ago

ancwrd1 commented 3 years ago

When trying to use the SingleInstance on Windows in the concurrent or asynchronous context the compilation errors are raised about data structure being not Send (and eventually Sync):

the trait `Send` is not implemented for `*mut c_void`

I think it is related to the internal implementation of single-instance. Would be nice if it's made Send + Sync explicitly on Windows.

On macOS and Linux this doesn't happen.

WLBF commented 3 years ago

SingleInstance is suppose to make process singleton. I dont think it should be used in the concurrent or asynchronous context.