-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
We can come up with a public API to create global, singleton tasks, possibly with the following signatures:
unsafe fn register_named_service<T>(n: str, f: fn~(port<T>))
unsafe fn get_named_service<T>(n: str) -> chan<T>
This would, if the named service doesn't exist, create a new task and execute the specified function. You would use this in each test to create or retrieve a global service to manage your state. The big reservation I have about this is that we can not currently make this interface type safe - we can't even check the types at runtime.
Description was copied from mail-list.
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.