Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在研究 pascal-fc 进行并发测试。
我熟悉 Java 的线程及其监视器。
我不明白渠道的作用,请解释一下。
通道是一种连接接收者和发送者的对象。
在Pascal-FC中,它们是强类型的:您必须声明它们允许发送和接收的对象类型。你真的可以把它们想象成通道,一个进程打开integers另一个进程的通道:它将能够integers从该通道发送和接收,以及另一个进程。
integers
它是一种通信设备,您可以在其上主要执行 2 项操作:
send
channel_var ! expression
receive
channel_var ? variable