 Back to Basics: Concurrencymemory. ○ In C++, we have these available, and they are known as ‘mutexes’ ● A mutex, allows ‘mutual exclusion’ to a block of code. ○ Thus, the operation is ‘atomic’ in the sense that only 1 operation me! 77std::mutex and mutual exclusion (1/4) ● So what our lock is doing is providing access to only one thread at a time (mutually exclusive access). 78std::mutex and mutual exclusion (2/4) ● So want one thread at a time to enter and modify the shared state in the program. 79std::mutex and mutual exclusion (3/4) ● So what our lock is doing is providing access to only one thread at a time (mutually0 码力 | 141 页 | 6.02 MB | 6 月前3 Back to Basics: Concurrencymemory. ○ In C++, we have these available, and they are known as ‘mutexes’ ● A mutex, allows ‘mutual exclusion’ to a block of code. ○ Thus, the operation is ‘atomic’ in the sense that only 1 operation me! 77std::mutex and mutual exclusion (1/4) ● So what our lock is doing is providing access to only one thread at a time (mutually exclusive access). 78std::mutex and mutual exclusion (2/4) ● So want one thread at a time to enter and modify the shared state in the program. 79std::mutex and mutual exclusion (3/4) ● So what our lock is doing is providing access to only one thread at a time (mutually0 码力 | 141 页 | 6.02 MB | 6 月前3
 Better Code: Contractscommunicating components whose interaction is based on precisely defined specifications of the mutual obligations — contracts.” —Building bug-free O-O software: An Introduction to Design by Contract™ communicating components whose interaction is based on precisely defined specifications of the mutual obligations — contracts.” —Building bug-free O-O software: An Introduction to Design by Contract™ communicating components whose interaction is based on precisely defined specifications of the mutual obligations — contracts.” —Building bug-free O-O software: An Introduction to Design by Contract™0 码力 | 204 页 | 4.46 MB | 6 月前3 Better Code: Contractscommunicating components whose interaction is based on precisely defined specifications of the mutual obligations — contracts.” —Building bug-free O-O software: An Introduction to Design by Contract™ communicating components whose interaction is based on precisely defined specifications of the mutual obligations — contracts.” —Building bug-free O-O software: An Introduction to Design by Contract™ communicating components whose interaction is based on precisely defined specifications of the mutual obligations — contracts.” —Building bug-free O-O software: An Introduction to Design by Contract™0 码力 | 204 页 | 4.46 MB | 6 月前3
 COMPOSABLE C++formulated as recursive calculations. Interesting variations often include mutual recursion. Interesting variations often include mutual recursion. The most common inhibitor of recursive beauty is mixed up0 码力 | 124 页 | 8.28 MB | 6 月前3 COMPOSABLE C++formulated as recursive calculations. Interesting variations often include mutual recursion. Interesting variations often include mutual recursion. The most common inhibitor of recursive beauty is mixed up0 码力 | 124 页 | 8.28 MB | 6 月前3
 The Beauty and Power of Primitive C++Relatively simple structures (“Flat” structures) called “flats” • No pointers • use offsets • No mutual references • Field types • Char, various integers, various reals/floats • Optional, variant, array0 码力 | 53 页 | 1.03 MB | 6 月前3 The Beauty and Power of Primitive C++Relatively simple structures (“Flat” structures) called “flats” • No pointers • use offsets • No mutual references • Field types • Char, various integers, various reals/floats • Optional, variant, array0 码力 | 53 页 | 1.03 MB | 6 月前3
 Back to Basics: Concurrencymtx.unlock(); // Now go! threadB.join(); printf("Hello again from A\n"); 15 mutex is a mutual exclusion mechanism. I like to compare it to a coffeeshop bathroom key. When Alice holds the0 码力 | 58 页 | 333.56 KB | 6 月前3 Back to Basics: Concurrencymtx.unlock(); // Now go! threadB.join(); printf("Hello again from A\n"); 15 mutex is a mutual exclusion mechanism. I like to compare it to a coffeeshop bathroom key. When Alice holds the0 码力 | 58 页 | 333.56 KB | 6 月前3
 C++26 Preview81synchronization mechanism for linked data structures frequently read, but seldom updated not provide mutual exclusion user to schedule specified actions P2545 Read-Copy Update 82single-writer multi-reader0 码力 | 118 页 | 2.02 MB | 6 月前3 C++26 Preview81synchronization mechanism for linked data structures frequently read, but seldom updated not provide mutual exclusion user to schedule specified actions P2545 Read-Copy Update 82single-writer multi-reader0 码力 | 118 页 | 2.02 MB | 6 月前3
 Concurrencydurable_goods, long_term_debts);CppCon 2023 74 David Olsen - Back to Basics: Concurrency MUTEXES MUTual EXclusion Most basic form of synchronization Only one thread at a time can lock or acquire the0 码力 | 160 页 | 2.91 MB | 6 月前3 Concurrencydurable_goods, long_term_debts);CppCon 2023 74 David Olsen - Back to Basics: Concurrency MUTEXES MUTual EXclusion Most basic form of synchronization Only one thread at a time can lock or acquire the0 码力 | 160 页 | 2.91 MB | 6 月前3
 《深入浅出MFC》2/e的程序代码的「执行事实」。系统也是以一个特定的数据结构(Thread Database,TDB)记 录执行线程的所有相关资料,包括执行线程区域储存空间(Thread Local Storage,TLS)、讯 息队列、handle 表格、地址空间(Memory Context )等等等。 最初,进程是以一个执行线程(称为主执行线程,primary thread)做为开始。如果需要,行 程可以 TerminateThread 结束某个执行线程 TlsAlloc 配置一个TLS(Thread Local Storage) TlsFree 释放一个TLS(Thread Local Storage) TlsGetValue 取得某个TLS(Thread Local Storage)的内容 TlsSetValue 设定某个TLS(Thread Local Storage)的内容 WaitForInputIdle Windows 系统提供四种同步化机制,帮助程序进行这种工作: 1. Critical Section(关键区域) 2. Semaphore(号志) 3. Event(事件) 4. Mutex(Mutual Exclusive,互斥器) MFC 也提供了四个对应的类别: 一想到本书的厚度,我就打消介绍同步机制的念头了。你可以在许多Visual C++ 或MFC 程序设计书籍中得到这个主题的知识。0 码力 | 1009 页 | 11.08 MB | 1 年前3 《深入浅出MFC》2/e的程序代码的「执行事实」。系统也是以一个特定的数据结构(Thread Database,TDB)记 录执行线程的所有相关资料,包括执行线程区域储存空间(Thread Local Storage,TLS)、讯 息队列、handle 表格、地址空间(Memory Context )等等等。 最初,进程是以一个执行线程(称为主执行线程,primary thread)做为开始。如果需要,行 程可以 TerminateThread 结束某个执行线程 TlsAlloc 配置一个TLS(Thread Local Storage) TlsFree 释放一个TLS(Thread Local Storage) TlsGetValue 取得某个TLS(Thread Local Storage)的内容 TlsSetValue 设定某个TLS(Thread Local Storage)的内容 WaitForInputIdle Windows 系统提供四种同步化机制,帮助程序进行这种工作: 1. Critical Section(关键区域) 2. Semaphore(号志) 3. Event(事件) 4. Mutex(Mutual Exclusive,互斥器) MFC 也提供了四个对应的类别: 一想到本书的厚度,我就打消介绍同步机制的念头了。你可以在许多Visual C++ 或MFC 程序设计书籍中得到这个主题的知识。0 码力 | 1009 页 | 11.08 MB | 1 年前3
 How Meta Made Debugging Async Code Easier with Coroutines and Sendersprev* data frame* instr* keep drop TLS magic* process_fileWalking the stack CPU ret* prev* frame* ret* prev* data ret* prev* data frame* instr* keep drop TLS magic* process_fileWalking the stack data ret* prev* data frame* instr* keep drop TLS magic* process_fileWalking the stack CPU ret* prev* ret* prev* data frame* instr* drop TLS magic* keep frame*Walking the stack CPU ret* ret* prev* ret* prev* data frame* instr* drop TLS magic* keep frame*Walking the stack CPU ret* prev* ret* prev* data frame* instr* drop TLS magic* keep ? inject…thunk frame*Walking the stack0 码力 | 131 页 | 907.41 KB | 6 月前3 How Meta Made Debugging Async Code Easier with Coroutines and Sendersprev* data frame* instr* keep drop TLS magic* process_fileWalking the stack CPU ret* prev* frame* ret* prev* data ret* prev* data frame* instr* keep drop TLS magic* process_fileWalking the stack data ret* prev* data frame* instr* keep drop TLS magic* process_fileWalking the stack CPU ret* prev* ret* prev* data frame* instr* drop TLS magic* keep frame*Walking the stack CPU ret* ret* prev* ret* prev* data frame* instr* drop TLS magic* keep frame*Walking the stack CPU ret* prev* ret* prev* data frame* instr* drop TLS magic* keep ? inject…thunk frame*Walking the stack0 码力 | 131 页 | 907.41 KB | 6 月前3
 Sender Patterns to Wrangle Concurrency in Embedded DevicesELc97ELc114ELc116EEEEESF_JiEEEJN6things3$_ 1EEEENSN_6detail7wrapperINSC_9_when_all6senderIXtlS4_tlS7_tlS8_Lc119ELc104ELc101ELc110ELc95ELc9 7ELc108ELc108EEEEEJNS16_10sub_senderINSW_IXtlNS3_ILm8EEEtlNS6 18_INSW_IXtlS19_tlS1A_tlS1B_Lc106ELc117ELc115ELc116ELc4 5ELc97ELc49EEEEESF_JiEEELm1EEENS18_INSM_IXtlNS3_ILm5EEEtlNS6_IcLm5EEEtlA5_cLc116ELc104ELc101ELc 110EEEEESF_NSW_IXtlS19_tlS1A_tlS1B_Lc106ELc117EL 0EEEELm2EEEEEEEEEEJNS11_3$_2EEEENSC_15_start_detached8receiverINS1S_8op_stateINS2_5cts_tIXtlS4_ tlS7_tlS8_Lc109ELc121ELc95ELc99ELc104ELc97ELc105ELc110EEEEEEENSG_6senderIXtlSJ_tlSK_tlSL_Lc114E Lc101ELc0 码力 | 106 页 | 26.36 MB | 6 月前3 Sender Patterns to Wrangle Concurrency in Embedded DevicesELc97ELc114ELc116EEEEESF_JiEEEJN6things3$_ 1EEEENSN_6detail7wrapperINSC_9_when_all6senderIXtlS4_tlS7_tlS8_Lc119ELc104ELc101ELc110ELc95ELc9 7ELc108ELc108EEEEEJNS16_10sub_senderINSW_IXtlNS3_ILm8EEEtlNS6 18_INSW_IXtlS19_tlS1A_tlS1B_Lc106ELc117ELc115ELc116ELc4 5ELc97ELc49EEEEESF_JiEEELm1EEENS18_INSM_IXtlNS3_ILm5EEEtlNS6_IcLm5EEEtlA5_cLc116ELc104ELc101ELc 110EEEEESF_NSW_IXtlS19_tlS1A_tlS1B_Lc106ELc117EL 0EEEELm2EEEEEEEEEEJNS11_3$_2EEEENSC_15_start_detached8receiverINS1S_8op_stateINS2_5cts_tIXtlS4_ tlS7_tlS8_Lc109ELc121ELc95ELc99ELc104ELc97ELc105ELc110EEEEEEENSG_6senderIXtlSJ_tlSK_tlSL_Lc114E Lc101ELc0 码力 | 106 页 | 26.36 MB | 6 月前3
共 90 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9














