Skip to content

async-std in Windows cdylib dlls (LoadLibrary/FreeLibrary startup/cleanup) #1059

Open
@Trolldemorted

Description

@Trolldemorted

Is there a way to use async-std in Windows cdylibs that are being loaded/unloaded with LoadLibrary/FreeLibrary?

For this we'd have to ensure that before DllMain with PROCESS_DETACH returns, all threads that were spawned by async-std are no longer running. Unfortunately I do not have a clear overview over the intrinsic behaviour of async-std's thread pools, reactors (are they still a thing?) and whatnot, and the documentation was not that helpful in this particular matter.

What troubles me most are the special rules that apply to DllMain, such as "you cannot wait for threads to finish".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions