发明名称 ONE-TIME INITIALIZATION
摘要 Aspects of the present invention are directed at providing safe and efficient ways for a program to perform a one-time initialization of a data item in a multi-threaded environment. In accordance with one embodiment, a method is provided that allows a program to perform a synchronized initialization of a data item that may be accessed by multiple threads. More specifically, the method includes receiving a request to initialize the data item from a current thread. In response to receiving the request, the method determines whether the current thread is the first thread to attempt to initialize the data item. If the current thread is the first thread to attempt to initialize the data item, the method enforces mutual exclusion and blocks other attempts to initialize the data item made by concurrent threads. Then, the current thread is allowed to execute program code provided by the program to initialize the data item.
申请公布号 US2011219379(A1) 申请公布日期 2011.09.08
申请号 US201113106836 申请日期 2011.05.12
申请人 MICROSOFT CORPORATION 发明人 KISHAN ARUN;CLIFT NEILL M.
分类号 G06F9/46 主分类号 G06F9/46
代理机构 代理人
主权项
地址