Does Swift have any native concurrency and multi-threading support?

Warrshrike

I'm writing a Swift client to communicate with a server (written in C) on an embedded system. Its not iOS/OSX related as I'm using the recently released Ubuntu version.

Does Swift have any native support for concurrency? I'm aware that Apple discourages developers from using threads and encourages handing tasks over to dispatch queues via GCD. The issue is that GCD seems to be only on Darwin (and NSThread is a part of Cocoa).

For example, C++11 and Java have threads and concurrency as a part of their standard libraries. I understand that platform specific stuff like posix on unix could be used under some sort of C wrapper, but for me that really ruins the point of using Swift in the first place (clean, easy to understand code etc.).

GPI

Quoting from Swift's GitHub, there's a readme for "evolutions" :

Concurrency: Swift 3.0 relies entirely on platform concurrency primitives (libdispatch, Foundation, pthreads, etc.) for concurrency. Language support for concurrency is an often-requested and potentially high-value feature, but is too large to be in scope for Swift 3.0.

I guess this means no language-level "primitives" for threading are in the pipeline for the foreseeable future.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Does Entity Framework support Multi-Threading?

From Dev

Row concurrency problems multi threading

From Dev

Does C++ provide built in multi threading support?

From Dev

Does CSS have any plans to support variables?

From Dev

does mySQL have native support for network programming?

From Java

Does Swift have documentation generation support?

From Dev

Swift: "Any" does not have member named element

From Dev

Modification of Utility Method to Support Multi-Threading

From Dev

Does Java have native OS file system events monitoring support?

From Dev

Bad acess, multi-threading, GCD, swift

From Dev

Does "let _ = ..." (let underscore equal) have any use in Swift?

From Dev

swift ios does core data have any function to pre populate

From Dev

does multi threading improve performance? scenario java

From Dev

Will be whether multi-threading support in mongodb ( without locking database)

From Java

Does Swift support reflection?

From Dev

Does Swift support WebRTC?

From Dev

Does SAS have a concurrency framework like Java

From Dev

Does SAS have a concurrency framework like Java

From Dev

Does Django have any plans to drop support for Python 2 in the near future?

From Dev

Does python's new 'pip wheel' have any support for building wheels for the dependencies listed in tests_requires?

From Dev

Does android-support-v13.jar have any use in a project that targets minSdkVersion="15"?

From Dev

Does android-support-v13.jar have any use in a project that targets minSdkVersion="15"?

From Dev

Multi threading

From Dev

Multi threading

From Dev

Threading and Concurrency Within A Servlet

From Dev

What threading algorithm(s) does Python's IMAP library support?

From Dev

Does swift have a protocol similar to CustomStringConvertible for verbose, multi-line printing?

From Dev

How does multi-threading or async code in JavaScript work?

From Dev

What exactly does `threading=multi` do when compiling boost?

Related Related

  1. 1

    Does Entity Framework support Multi-Threading?

  2. 2

    Row concurrency problems multi threading

  3. 3

    Does C++ provide built in multi threading support?

  4. 4

    Does CSS have any plans to support variables?

  5. 5

    does mySQL have native support for network programming?

  6. 6

    Does Swift have documentation generation support?

  7. 7

    Swift: "Any" does not have member named element

  8. 8

    Modification of Utility Method to Support Multi-Threading

  9. 9

    Does Java have native OS file system events monitoring support?

  10. 10

    Bad acess, multi-threading, GCD, swift

  11. 11

    Does "let _ = ..." (let underscore equal) have any use in Swift?

  12. 12

    swift ios does core data have any function to pre populate

  13. 13

    does multi threading improve performance? scenario java

  14. 14

    Will be whether multi-threading support in mongodb ( without locking database)

  15. 15

    Does Swift support reflection?

  16. 16

    Does Swift support WebRTC?

  17. 17

    Does SAS have a concurrency framework like Java

  18. 18

    Does SAS have a concurrency framework like Java

  19. 19

    Does Django have any plans to drop support for Python 2 in the near future?

  20. 20

    Does python's new 'pip wheel' have any support for building wheels for the dependencies listed in tests_requires?

  21. 21

    Does android-support-v13.jar have any use in a project that targets minSdkVersion="15"?

  22. 22

    Does android-support-v13.jar have any use in a project that targets minSdkVersion="15"?

  23. 23

    Multi threading

  24. 24

    Multi threading

  25. 25

    Threading and Concurrency Within A Servlet

  26. 26

    What threading algorithm(s) does Python's IMAP library support?

  27. 27

    Does swift have a protocol similar to CustomStringConvertible for verbose, multi-line printing?

  28. 28

    How does multi-threading or async code in JavaScript work?

  29. 29

    What exactly does `threading=multi` do when compiling boost?

HotTag

Archive