-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Execute inUIProcessDo: when even there is no process #642
Comments
@tinchodias @plantec do you have an opinion? |
Hello Pierre. I've found the diff! you suggest changing the if receiver from I imagine you are testing on a space that's not open, right? I mean, you didn't send I always considered this API as a patch/workaround to be removed one day (I don't know its origin, it was already there). I have the impression the API exists because of "low-level" graphics libraries that have global state that is broken if you do the FFI calls from Pharo from different Processes (the C library is not aware of them, it just has a global state). In particular, I think this happens in https://freetype.org/. |
This is very practical for write some graphic tree edition code. Sometimes you create something that is not already open in a Space (for example initialization of graphic resources) and sometimes you are editing objects that are display on a Space. With this method (and my suggestion) this is transparent. This is difficult for dev to learn and use the concept of "if I edit an object that is show I need to do that on a bltask", I see mistakes about that every days and we have concurrency access problem. |
I agree with Martin. this seems to be a workaround |
this kind of facility can be overused very easily. it can lead to bad effect on performance because a task can be launched on each use |
But this is not possible to edit BlElement without bltask without concurency risk, I dont see the difference. |
ok, I understand the context. But in that case, use a task explicitly |
The method BlElement>>inUIProcessDo: aBlock cannot value block when there is no uiProcess (nil).
This is the case when I'm writing basic unit tests.
I think it should be great to value block in all cases.
This can be use to build from the same way a BlElement inside or outside the graphic tree.
A fix can be:
The text was updated successfully, but these errors were encountered: