Object variable lose context in PHP pthreads

后端 未结 1 1726
眼角桃花
眼角桃花 2021-01-24 21:44

I was working with pthreads in PHP and noticed that pthreads loses object variables in its context, is this normal or a bug or I\'m doing something wrong ?

class         


        
相关标签:
1条回答
  • 2021-01-24 22:09

    It's normal: https://gist.github.com/krakjoe/6437782

    There is no point in me writing the relevant parts out again; you will benefit from reading the whole article.

    TL;DR Resources are officially unsupported, coupled with how pthreads objects work, this leads to the behaviour you are experiencing.

    0 讨论(0)
提交回复
热议问题