Method and apparatus for interruptible synchronization for thread
暂无分享,去创建一个
A method and an apparatus for interruptible synchronization for threads are provided to interrupt a specific thread from a monitor providing mutually exclusive synchronization for a predetermined object. A method and an apparatus for interruptible synchronization for threads comprises the following steps of: controlling the mutual exclusive access of at least one or more threads to a predetermined object by using a predetermined monitor; and interrupting a first thread waiting the monitor(S630). The monitor includes a condition variable for indicating a waiting condition and a counter variable for indicating the presence of a second thread obtaining the monitor and the presence of a thread waiting for the condition variable.