top | item 40308313

(no title)

amgreg | 1 year ago

Thank you for this, but thank you especially for virtual threads! They are awesome!

Is point 2 a virtual-thread only risk, or would we incur it with regular threads too?

discuss

order

pron|1 year ago

Thank you! You incur this risk when pooling any kind of thread, too, but with platform threads at least pooling makes sense because they're costly, so you just need to be careful with thread locals on a shared thread pool. Not needing to share threads and potentially leak context is a security advantage of virtual threads.