The Swift language now has "Actors"

7 lượt xem
Chuyển tới thư đầu tiên chưa đọc

Terry Hayes

chưa đọc,
17:00:52 8 thg 6, 20218/6/21
đến fr...@googlegroups.com
Hello all,

I've been watching some of the presentations at this week's Apple WWDC. One item that drew my attention is the addition to the Swift language of an "actor" keyword on data structures. This keyword is in addition to struct and class.


I'm going to watch this session now, but it appears to provide mutual exclusion for mutable data in a heap allocated object (class).  As a result, most method calls need to be treated as asynchronous - using the also newly introduced async/await keywords.

Let the discussion begin!

Terry

Trả lời tất cả
Trả lời tác giả
Chuyển tiếp
0 tin nhắn mới