Re: [swift-corelibs-dev] DispatchQueue and Threads

2017-12-26 Thread Geordie Jay via swift-corelibs-dev
Hi Pierre Pierre Habouzit schrieb am Fr. 22. Dez. 2017 um 19:59: > On Dec 21, 2017, at 10:57 AM, Geordie J via swift-corelibs-dev < > swift-corelibs-dev@swift.org> wrote: > > Hi, > > We are having some issues with threading / dispatch queues this week. > Basically I’m wondering why the followin

Re: [swift-corelibs-dev] DispatchQueue and Threads

2017-12-22 Thread Pierre Habouzit via swift-corelibs-dev
> On Dec 22, 2017, at 10:59 AM, Pierre Habouzit via swift-corelibs-dev > wrote: > >> On Dec 21, 2017, at 10:57 AM, Geordie J via swift-corelibs-dev >> mailto:swift-corelibs-dev@swift.org>> wrote: >> >> Hi, >> >> We are having some issues with threading / dispatch queues this week. >> Basic

Re: [swift-corelibs-dev] DispatchQueue and Threads

2017-12-22 Thread Scott Lessans via swift-corelibs-dev
Those GCD examples make sense to me on the surface actually... print(Thread.isMainThread) // true (actually on the main thread) DispatchQueue.main.async { print(Thread.isMainThread) // false (on some libdispatch/system owned thread) } The following makes sense as the main DispatchQueue is no

Re: [swift-corelibs-dev] DispatchQueue and Threads

2017-12-22 Thread Pierre Habouzit via swift-corelibs-dev
> On Dec 21, 2017, at 10:57 AM, Geordie J via swift-corelibs-dev > wrote: > > Hi, > > We are having some issues with threading / dispatch queues this week. > Basically I’m wondering why the following “async” code has the output it does: > > print(Thread.isMainThread) // true > DispatchQueue.m