If you haven't spotted it, the new snapshots include Dispatch on Linux for
the first time - please test it out as there may well be number of issues
to shake out, especially with the new Swift 3 API.
The availability is thanks to the hard work of a large number of people,
including Dave Grove, Hubertus Franke, Pierre Habouzit, Daniel Steffan,
Matt Wright, Tony Parker, Philippe Hausler and Mishal Shah.
Chris
···
From: mishal_shah via swift-dev <swift-dev@swift.org>
To: swift-dev <swift-dev@swift.org>, swift-users@swift.org
Date: 24/08/2016 01:04
Subject: [swift-dev] New Swift Snapshots Available!
Sent by: swift-dev-bounces@swift.org
In case anyone else hits an error about "uuid/uuid.h” when they import Foundation, I had to install uuid-dev to get this snapshot to work (on a virgin Ubuntu 15.10 server install):
sudo apt-get install uuid-dev
Super-excited about this snapshot :)
···
On 24 Aug 2016, at 03:03, mishal_shah via swift-users <swift-users@swift.org> wrote:
If you haven't spotted it, the new snapshots include Dispatch on Linux for the first time - please test it out as there may well be number of issues to shake out, especially with the new Swift 3 API.
I’m seeing weird behaviour with DispatchSources + sockets on Linux right now - whereas on Mac both read and write sources fire correctly, on the latest Linux snapshot only the read event is firing.
On 24 Aug 2016, at 12:38, Chris Bailey via swift-users <swift-users@swift.org> wrote:
The availability is thanks to the hard work of a large number of people, including Dave Grove, Hubertus Franke, Pierre Habouzit, Daniel Steffan, Matt Wright, Tony Parker, Philippe Hausler and Mishal Shah.
A couple more DispatchSource issues - I’m getting a crash (on all platforms) if a source deallocs before the cancellation handler has been called, which seems to be a known issue.
To get around it on Darwin, I was taking an unmanaged retained ref to the source and releasing it in the cancellation handler. But it turns out that on Linux,
let s: DispatchSourceRead = […]
Unmanaged.passRetained(s)
crashes llvm. Giving the typechecker a hint
Umanaged<DispatchSourceRead>(s)
tells me that type 'DispatchSourceRead' does not conform to protocol ‘AnyObject’ which seems weird. Is it still class-based on Linux, or something different?
I ended up doing this
var rs: DispatchSourceRead? = rsource
var ws: DispatchSourceWrite? = wsource
rsource.setCancelHandler { _ = rs?.handle; rs = nil } //Access a property to shut the bloody compiler up,
wsource.setCancelHandler { _ = ws?.handle; ws = nil } //and to ensure the var isn't optimised away.
so all the above is moot, but I thought I should report it.
···
On 24 Aug 2016, at 12:38, Chris Bailey via swift-users <swift-users@swift.org> wrote:
If you haven't spotted it, the new snapshots include Dispatch on Linux for the first time - please test it out as there may well be number of issues to shake out, especially with the new Swift 3 API.
From: Michael Ferenduros via swift-users <swift-users@swift.org>
Subject: Re: [swift-users] [swift-dev] New Swift Snapshots Available!
Date: August 26, 2016 at 08:00:55 PDT
To: swift-users@swift.org
Reply-To: Michael Ferenduros <mike.ferenduros@gmail.com>
If you haven't spotted it, the new snapshots include Dispatch on Linux for the first time - please test it out as there may well be number of issues to shake out, especially with the new Swift 3 API.
I’m seeing weird behaviour with DispatchSources + sockets on Linux right now - whereas on Mac both read and write sources fire correctly, on the latest Linux snapshot only the read event is firing.
The availability is thanks to the hard work of a large number of people, including Dave Grove, Hubertus Franke, Pierre Habouzit, Daniel Steffan, Matt Wright, Tony Parker, Philippe Hausler and Mishal Shah.
Yes, this is a known libkqueue issue because on linux watching a fd in epoll can only be done once, and EVFILT_READ/EVFILT_WRITE cause two registrations for the same fd, only one will stay.
-Pierre
···
On Aug 26, 2016, at 5:43 PM, Jordan Rose via swift-corelibs-dev <swift-corelibs-dev@swift.org> wrote:
Begin forwarded message:
From: Michael Ferenduros via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>>
Subject: Re: [swift-users] [swift-dev] New Swift Snapshots Available!
Date: August 26, 2016 at 08:00:55 PDT
To: swift-users@swift.org <mailto:swift-users@swift.org>
Reply-To: Michael Ferenduros <mike.ferenduros@gmail.com <mailto:mike.ferenduros@gmail.com>>
On 24 Aug 2016, at 12:38, Chris Bailey via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
If you haven't spotted it, the new snapshots include Dispatch on Linux for the first time - please test it out as there may well be number of issues to shake out, especially with the new Swift 3 API.
I’m seeing weird behaviour with DispatchSources + sockets on Linux right now - whereas on Mac both read and write sources fire correctly, on the latest Linux snapshot only the read event is firing.
The availability is thanks to the hard work of a large number of people, including Dave Grove, Hubertus Franke, Pierre Habouzit, Daniel Steffan, Matt Wright, Tony Parker, Philippe Hausler and Mishal Shah.