Skip to content

How about thread safety? #228

@IdWV

Description

@IdWV

When looking through the code I have the impression that the code should be thread safe, as long as you only access the uc_vm_t object from the thread where the uc_vm_execute() function is running.

With one exception, all uc_resource_type_t *objects in the modules in the /lib directory are global. I think this means that running 2 scripts using the same module in different threads can give undesired results.

To solve this, I think a module should be able to store a pointer in uc_vm_t (together with a cleanup function), and request that back. Maybe by using that cleanup function pointer as key.

I couldn't find it, is such a storage implemented?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions