You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?)
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
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 thetask_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 aFuture
, so that the executor loop doesn't have to stop waiting for theRwLock
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?)
The text was updated successfully, but these errors were encountered: