Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Thomas Visser
    @Thomvis
    Welcome to the BrightFutures Gitter Room. Let's try this out!
    Stepan Hruda
    @stepanhruda
    Hi guys, I have a quick question – does a callback get executed if the promise gets completed before the receiver gets a chance to provide the callback?
    more specifically: a method returns a future, but it can also immediately synchronously fail, so it fails the promise before returning the future. Will the future still work as expected?
    Thomas Visser
    @Thomvis
    Yes, when a callback is added to an already completed future, it is executed 'immediately'. Immediately is between quotes because the default behavior is to schedule the callback in an asynchronous manner (with dispatch_async). That should be appropriate for most cases.
    Stepan Hruda
    @stepanhruda
    Thanks @Thomvis
    Tancrède Fx
    @t4ncr3d3
    Hi Thomas. I suppose that when using ‘ImmediateExecutionContext’ the bloc is executed on the ‘current' thread. I mean the Main thread if called from the Main or a background thread if called from background. I am right?
    Thomas Visser
    @Thomvis
    Hi @t4ncr3d3. Yes, you're right. No thread switching will occur. It is however important to realise what the 'current' thread is. For that you'll have to understand when the context is used. For example, if you add a completion handler to a future with the immediate execution context, the handler will get called on the thread that completed the future.
    Tancrède Fx
    @t4ncr3d3
    OK. Thanks
    Wyeth Shamp
    @wshamp
    With XCode 8 gm out now do you have a timeframe for swift 3 compatibility?
    Sudara Fernando
    @wsimf
    New to futures, great library though
    Juri Pakaste
    @juri
    there's no neat way to map both success and failure cases of a future to different types, is there? so if I want to convert from Future<T1, E1> to Future<T2, E2> I need to do Future { complete in f1.onSuccess{ complete(…) }.onFailure { complete(…) }, right?
    Erwin Zhang
    @rwinzhang
    Hi guys, I have a quick question - Does every callback should use [weak self] if it has a self reference to prevent retaining cycle?
    Erwin Zhang
    @rwinzhang
    @Thomvis ? Thanks in advance
    Ghost
    @ghost~5c515d7ad73408ce4fb65543
    Hi @all, im runnning into building issues ! can somebody help `