Blocking and non-blocking in OpenGL

Source: Internet
Author: User

The more seemingly simple and frequently used. The more we don't know why. This is why I wrote this article.
Blocking and non-blocking assignments are generally used in the process, including always, initial processes, and assign assignments.

Blocking assignment and non-blocking assignment

Always @ (Event-expression)

Begin <lhs1 = rhs1>

<Lhs2 = rhs2>

......

End

You can also write the always process blocks that adopt the non-blocking assignment method as follows:

Always @ (Event-expression)

Begin <lhs1 <= rhs1>

<Lhs2 <= rhs2>

......

End

The essential difference between the blocking assignment "=" and the non-blocking assignment "<=" is that the right-side expression of the non-blocking assignment statement is not immediately assigned to the left-side after calculation, instead, start the next statement to continue execution. We can understand it as all right-side expressions, such as rhs1 and rhs2, are calculated at the beginning of the process. After calculation, at the end of the process, the left-side variables lhs1 and lhs2 are assigned respectively.
The blocking assignment statement is assigned to the left variable immediately after each right expression is calculated, that is, the assignment statement lhs1 = after rhs1 is executed, lhs1 is updated immediately, at the same time, the statement lhs1 = rhs2 can be executed only after the execution of lhs1 = rhs1, and so on. The execution result of the previous statement directly affects the execution result of the subsequent statement.

Blocking and non-blocking in OpenGL

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.