Skip to content
  • Peter Xu's avatar
    b60ec76a
    iothread: push gcontext earlier in the thread_fn · b60ec76a
    Peter Xu authored
    
    
    We were pushing the context until right before running the gmainloop.
    Now since we have everything unconditionally, we can move this
    earlier.
    
    One benefit is that now it's done even before init_done_sem, so as
    long as the iothread user calls iothread_create() and completes, we
    know that the thread stack is ready.
    
    Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
    Message-id: 20190306115532.23025-5-peterx@redhat.com
    Message-Id: <20190306115532.23025-5-peterx@redhat.com>
    
    [Tweaked comment wording as discussed with Peter Xu.
    --Stefan]
    
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    b60ec76a
    iothread: push gcontext earlier in the thread_fn
    Peter Xu authored
    
    
    We were pushing the context until right before running the gmainloop.
    Now since we have everything unconditionally, we can move this
    earlier.
    
    One benefit is that now it's done even before init_done_sem, so as
    long as the iothread user calls iothread_create() and completes, we
    know that the thread stack is ready.
    
    Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
    Message-id: 20190306115532.23025-5-peterx@redhat.com
    Message-Id: <20190306115532.23025-5-peterx@redhat.com>
    
    [Tweaked comment wording as discussed with Peter Xu.
    --Stefan]
    
    Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
Loading