You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
makeObserver uses a static struct AnonymouseObserver{...}which, from my understanding, means that there is only one instance of this struct per thread. Hence, when I do this:
(edit) sorry I might have jumped the gun on responding when I saw the foreach and that you were getiing the last thing in the loop because I didn't pay attention to the use of static. This may not work there. 😬
makeObserver uses a
static struct AnonymouseObserver{...}
which, from my understanding, means that there is only one instance of this struct per thread. Hence, when I do this:I get a lof of observers, but they all point to the same function of the last thing in the loop.
But I would like to have an observer per thing. How to do this?
The text was updated successfully, but these errors were encountered: