• 尽可能减少同步代码数量长度

    Minimize the number and length of synchronized code blocks.

    youdao

  • 同步方法同步代码

    Synchronized method or synchronized block?

    youdao

  • 必要进行同步场合下,应该尽量缩小同步代码

    In cases where synchronization is necessary, the synchronized code block should be minimized.

    youdao

  • 创建同步代码产生16行的字节码创建同步方法产生了5行。

    Creating the synchronized block yielded 16 lines of bytecode, whereas synchronizing the method returned just 5.

    youdao

  • 同步代码所需执行时间其他线程等待进入代码块的时间就越长。

    The longer a synchronized code block requires for execution, the longer other threads wait to enter that block.

    youdao

  • 如果同步代码不够应该代码进行分析,对其重构,以使所有可以异步运行代码位于同步代码块之外

    If it is not small enough, you should analyze your code and refactor it in such a way that anything that could run asynchronously is located outside of the synchronized block.

    youdao

  • 只有方法代码同步标记。

    Only methods or code blocks can be marked "synchronized".

    youdao

  • 根据我们观察我们似乎需要一些锁的访问进行优化,比如线程执行同步代码循环体中。

    In light of our observation it seems as if we should be able to optimize access in the case where a thread is looping over a synchronized block of code.

    youdao

  • 同步代码执行之前需要客户对象相关

    This synchronized code block acquires the lock associated with the customer class object before it executes.

    youdao

  • 糟糕的还在后面;合并之后,同步代码块包含递增序列,因而可以降低强度,转换一个单独的相加

    And it gets worse; after coalescing the locks, the synchronized body will contain only a sequence of increments, which can be strength-reduced into a single addition.

    youdao

  • 能够进行同步访问代码有时称为关键部分

    Code areas with synchronized access are sometimes called critical sections.

    youdao

  • 同步语句仅允许一个线程进入代码

    The synchronized statement enbales only one thread to enter a code block at a time.

    youdao

  • 要是一小线程安全代码要求同步两个操作隔开那么使用一个同步一般更好些

    If you have two operations that require synchronization separated by a small block of thread-safe code, you are generally better just using a single synchronized block.

    youdao

  • 同步方法代码允许线程入口处锁定对象出口处解锁(针对方法代码)。

    Synchronized methods and blocks allow a thread to lock an object on entry and unlock the object on exit (to the method or block).

    youdao

  • 即使代码块内部指令也许乱序执行也不会使用了同步其它线程造成任何影响。

    Even though processing of statements within blocks may be out of order, this cannot matter to other threads employing synchronization.

    youdao

  • 即使代码块内部指令也许乱序执行也不会使用了同步其它线程造成任何影响。

    Even though processing of statements within blocks may be out of order, this cannot matter to other threads employing synchronization.

    youdao

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定