[Accepted] SE-0392: Custom Actor Executors

Hi everyone. The language workgroup has decided to accept SE-0392: Custom Actor Executors after the second round of review, which ran from April 7...17, 2023. During the second review:

  • Participants raised questions about how this feature's potential role in inhibiting actor reentrancy, for code where allowing reentrance is not desired. The language workgroup agrees with the proposal authors that, while that is an important future direction, it is not this proposal's problem to solve.
  • There was some discussion about the naming of the preconditionIsolated, assertIsolated, and assumeIsolated APIs. Although precondition is not a verb, the language workgroup believes the naming association with precondition() and assert() is important to underline that they have analogous behavior in whether they check or not in debug or release builds. assumeIsolated doesn't have as clear of a precedent, but there wasn't a clearly better alternative, and the proposed name seems acceptable as is.
  • There was some concern about UnownedJobs unsafety, and questions as to whether its variation of runSynchronously and other APIs should have unsafe in the name to make the potential for undefined behavior more apparent. Although UnownedJob unfortunately doesn't have Unsafe in the type name (and it can't be added because of existing ABI constraints), the language workgroup believes the type itself should be seen as inherently unsafe, and like other fundamentally unsafe types such as Unmanaged, it doesn't need to have that unsafety reiterated on every method name. Also, although SE-0392 doesn't formally deprecate UnownedJob yet, the ExecutorJob type will be more prominent, which is safe and uses noncopyability to enforce safety, and developers will be encouraged to use it over UnownedJob as much as possible. When the expressivity of noncopyable types reaches the point that most uses of UnownedJob can be avoided, then we would like to see it formally deprecated.

Thank you to everyone who participated in both rounds of review!

30 Likes