One use case which surfaced today was being able to track whether we're on the "main UI thread" or some other thread. I'm wondering if we could model this with a context capability which is unsafe to create, and !send + !Sync.
This kind of feels like it would be inherent to the thread which we create, almost like an auto-context? But since we probably can't build it in, having it be a regular context could work just as well.
This feels like a common pattern which occurs (browsers, dotnet, all work like this), so it might be worth writing out as a use case.
One use case which surfaced today was being able to track whether we're on the "main UI thread" or some other thread. I'm wondering if we could model this with a context capability which is
unsafe
to create, and!send + !Sync
.This kind of feels like it would be inherent to the thread which we create, almost like an auto-context? But since we probably can't build it in, having it be a regular context could work just as well.
This feels like a common pattern which occurs (browsers, dotnet, all work like this), so it might be worth writing out as a use case.