File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
shared/src/main/scala/async Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ object Channel:
276276 * there are *only* all readers or all senders. It must be externally synchronized.
277277 */
278278 private [async] class CellBuf ():
279- case class Send (cs : CanSend , sender : Sender ^ )
279+ final case class Send (cs : CanSend , sender : Sender ^ )
280280 type Cell = Reader | Send
281281 // reader == 0 || sender == 0 always
282282 private var reader = 0
@@ -293,7 +293,8 @@ object Channel:
293293 pending.head.asInstanceOf [Reader ]
294294 def nextSender =
295295 require(sender > 0 )
296- pending.head.asInstanceOf [(CanSend , Sender )]
296+ val Send (cs, s) = pending.head.asInstanceOf [Send ]
297+ (cs, s)
297298 def dequeue () =
298299 pending.dequeue()
299300 if reader > 0 then reader -= 1 else sender -= 1
You can’t perform that action at this time.
0 commit comments