-
Notifications
You must be signed in to change notification settings - Fork 665
Closed
Description
Conversation moved to rustasync/team#7
I am currently designing a crate. In this crate, I have a lazy_static!
HashMap
, that I'm filling with one piece of data per task, in the task_local!
constructor.
As a consequence, I have to handle locking to this HashMap
. Which would seem to be handled cleanly only by constructing the actual piece of data from a Future
, so that the executor loop doesn't have to stop waiting for the RwLock
when spawning a task.
What do you think about this idea? (also, is there maybe some other way I don't know of to associate each task with a serializable ID and additional metadata, and my problem is void?)
Metadata
Metadata
Assignees
Labels
No labels