[swift-evolution] Preconditions aborting process in server scenarios [was: Throws? and throws!]

David Waite david at alkaline-solutions.com
Mon Jan 16 17:57:57 CST 2017

My interpretation is that he was advocating a future where a precondition’s failure killed less than the entire process. Instead, shut down some smaller portion like a thread, actor, or container like .Net's app domains (which for those more familiar with Javascript could be loosely compared with Web Workers).

Today - if you wanted a Swift server where overflowing addition didn’t interrupt your service for multiple users, you would need to use something like a pre-fork model (with each request handled by a separate swift process)

That's the difference between CLI and desktop apps where the process is providing services for a single user, and a server where it may be providing a service for thousands or millions of users.


> On Jan 16, 2017, at 2:32 PM, Callionica (Swift) via swift-evolution <swift-evolution at swift.org> wrote:
> One stray thread performing an overflowing addition can be the difference between a secure system and an insecure one. Better to take the process down.
> -- Callionica
> On Sun, Jan 15, 2017 at 10:48 PM Russ Bishop via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
> I don’t think it makes sense to abort a server process (potentially dropping X threads and thousands of connections on the ground) because one stray thread performed an overflowing addition… 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170116/408643a9/attachment.html>

More information about the swift-evolution mailing list