Otherwise, the thread blocks until the mutex clears.
否则,线程将阻止,直到清除互斥体。
With a higher volume of data from this example, it is possible to demonstrate some concrete examples of the causes of thread BLOCKs and WAITs.
有了这个例子中的大量数据,就可以使用一些具体例子展示线程BLOCK和WAIT的起因。
Boolean that specifies whether the current thread blocks until after the specified selector is performed on the receiver on the main thread.
一个布尔值,指定是否阻塞当前线程直到指定选择器在主线程中执行完毕。
The Listing 1 code shows a synchronous service method call where the client thread blocks inside the service call and doesn't return until the call is completed and the results are available.
清单1中的代码显示了同步方法调用,其中的客户机线程将阻塞在服务调用内,在调用完成且结果可用之后才会返回。
This blocks the main thread but executes the code on another thread.
这阻塞了主线程但是在另一个线程上执行代码。
Synchronized methods and blocks allow a thread to lock an object on entry and unlock the object on exit (to the method or block).
同步的方法和代码块允许线程在入口处锁定对象并在出口处解锁(针对方法或代码块)。
The VM object contains data structures for the very specific thread execution, like for instance current blocks, bindings, exceptions, etc.
VM对象包含了表示当前线程执行的数据结构,例如当前的块、绑定以及异常等。
The wait function on the event object blocks the calling thread until its state is set to signaled state.
对事件对象调用的等待函数会阻塞调用线程,直到其状态被设置为有信号状态为止。
Instead of throwing an exception when the queue is empty, the reader thread now blocks itself on the condition variable.
当队列是空的时候,读线程现在并不抛出异常,而是在条件变量上阻塞自身。
When the synchronization object is used in one of the wait functions, the wait function blocks the calling thread until the state of the synchronized object is set to signaled.
当在一个等待函数中使用同步对象时,等待函数就会阻塞调用线程,直到同步对象的状态被设置为有信号为止。
If the exclusive access to the resource is already locked, this method blocks the calling thread until it is unlocked.
如果独占访问的资源已经被锁定,则此方法阻塞那个调用线程,直到那个资源被解除锁定。
A dispatched thread with an RT priority is allowed to execute until it blocks, voluntarily relinquishes control by yielding, or is preempted by a thread with a higher RT priority.
具有RT优先级的调度线程可以一直执行直至阻塞,通过让步自愿放弃控制权,或被具有更高rt优先级的线程抢占。
Instead of adding and removing elements from the queue immediately, the thread performing the operation blocks until space or an element is available.
不是立即从队列中添加或者删除元素,线程执行操作阻塞,直到有空间或者元素可用。
Because thread 1 currently holds this lock, thread 2 blocks.
由于线程1目前持有此锁,线程2被阻断。
Synchronous – The consumer uses a single thread to invoke the service; the thread sends the request, blocks while the service is running, and waits for the response.
同步——使用者通过单个线程调用服务;该线程发送请求,在服务运行时阻塞,并且等待响应。
To ensure that your implementation is thread-safe, a class that implements this interface should use either the synchronized keyword on the methods or synchronized blocks within the methods.
为了确保实现是线程安全的,实现该接口的类应该在方法上使用synchronized关键字,或者在方法内部使用同步锁。
This blocks the thread until the agent has executed the function that was sent to it.
这将阻止线程,直到agent执行了发送给它的函数。
Number of blocks and total block time: the number of instances and total elapsed time when the thread was in a BLOCKED state while invoking a method or service.
阻塞数量和总阻塞时间:在调用某个方法或服务时,处于BLOCKED状态的线程的实例数量和总占用时间。
The only problem with this function is that when it periodically executes, it executes on the main thread and thus blocks any interactions from the user during that time.
此函数的惟一缺陷是:它在主线程上执行,因此,在此期间,它会阻塞与用户的任何交互。
Each service invocation to the banking device blocks a worker thread within the server.
对银行设备的每次服务调用都会阻塞服务器内的工作线程。
In general, strive to make your synchronized blocks as lean as possible, without harming thread safety.
一般而言,在保证线程安全的前提下要尽可能地简化同步语句。
Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
阻塞直到所有任务执行完毕。当任意以下情况出现则停止阻塞,以先发生为准:收到关闭请求、超时、线程中断。
The upgraded drum locking device has integral drum locking blocks and a float screw rod, with the antivibration performance improved and the thread clearance eliminated.
改进的穿孔机转鼓器结构,采用整体压鼓块和浮动丝杆,消除了螺纹间隙,提高了抗振性能。
The watcher iterates through all thread information blocks, and for each of them, it does the following.
在观察家遍历所有线程信息块,每个项目的,它如下。
Blocks the current thread until the specified property of this control is equal to the specified value, or until the default time-out expires.
阻止当前线程,直到此控件将出现在用户界面中或默认的超时时间到期之前。
When you launch two blocks containing a single thread each, it results in two warps, each of which contains 1 active thread.
当你启动两个块包含一个线程,它导致两个扭曲,每一种都包含1活动线程。
Synchronize blocks both the main thread and the calling thread while it's performing the procedure that you pass to it, so overusing it can detract from the benefits of multi-threading.
同步阻塞主线程和调用线程执行过程,你传递给它,所以过度使用它可以减损多线程的好处。
I padded down unlit alleys towards a thread of music, and emerged beneath flat-blocks to see a floodlit wedding feast.
我跟随着隐约听到的音乐走进了漆黑的巷子,突然在居民楼之下出现了灯火通明的婚宴。
Sets the period of time to wait for the associated process to exit, and blocks the current thread of execution until the time has elapsed or the process has exited.
设置等待关联进程退出的时间,并在该段时间结束前或该进程退出前,阻止当前线程执行。
This method blocks until the calling thread enters the lock, and therefore might never return.
这个方法会阻挡直到呼叫执行绪进入锁定,因此可能永远不会返回。
应用推荐