[英]Custom Attributes for POSIX Threads
是否可以在POSIX線程中添加自定義屬性(即名稱,互斥塊級別等)? 這個想法是操縱附加到線程上下文的信息。
起初,我想到了線程本地存儲 (TLS)。 但是也許您想從線程外部執行此操作……如果這樣,TLS將不起作用,因為它僅對線程內部運行的代碼有效。
但是,由於您對所有線程都有唯一的標識符( threadid ),因此您應該能夠使用任何以字典為鍵的字典型數據結構。
[英]Posix Threads - Threads in Parallel
[英]Creating threads (POSIX threads)
[英]POSIX threads and fairness (semaphores)
[英]POSIX Threads, unique execution
[英]thread cancellation in posix threads
[英]multiple POSIX threads
[英]POSIX Threads and signal masks
[英]POSIX Threads with Sockets in C
[英]Posix threads and priority
[英]POSIX threads vs parallelism
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.