Skip to content

strand翻译问题 #4

Description

@ender233

位置:第二章->异步工作 58页

在上述代码中,我们保证前面的5个线程和后面的5个线程是顺序执行的。func
called, i = 0在func called, i = 1之前被调用,然后调用func called, i = 2……同
样func called, i = 5在func called, i = 6之前,func called, i = 6在func called, i = 7被
调用……你需要注意的是尽管方法是顺序调用的,但是不意味着它们都在同一个线
程执行。运行这个程序可能得到的一个结果如下:

“我们保证前面5个线程和后面的5个线程是顺序执行的”, 代码中只开了三个线程,从i 0i 9不应该是线程,而是10个异步操作吧?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions