On 17-10-22, 21:00, Kent Gibson wrote:
+/// Sim Ctx +#[derive(Debug)] +struct SimCtx {
- ctx: *mut gpiosim_ctx,
+}
+unsafe impl Send for SimCtx {} +unsafe impl Sync for SimCtx {}
Is gpiosim thread safe?
There is no locking in place at the moment, if two threads try to do conflicting operations at the same time. Nothing will stop them I believe.
Though this module is only used for carrying out the tests at the moment, where we are generating events from parallel threads. I am not sure if we should make it more complex, for example with locking. Or is there something else we can do ?