开发者

Image is hanging, what next?

I was following t开发者_StackOverflow社区he tutorial on Magma from the awesome Seaside book and at one point my image got stuck completely. I was in the debugger at that moment and I've tried to run "inspect it" on ToDoDB root part of the following snippet:

ToDoDB createDB.
ToDoDB commit: [ ToDoDB root add: ToDoItem new ].
ToDoDB release.

After that my image stopped responding to anything.

I'm kind of curious why Magma behaved that way on inspect action, but I'm more interested in learning what are my options for fixing this issue? Should I just throw out this image and start from scratch? Can I send some OS signal to the VM to kill the active thread or something? Smalltalk newbie here.


Sean has already answered, but you can find it also in the pharo collaborative book: http://book.pharo-project.org/book/TipsAndTricks/InterruptKey/

Just another remark where you say "Can I send some OS signal to the VM to kill the active thread or something? Smalltalk newbie here.". Notice that most Smalltalk dialects have what is called "green thread". That is, that from the OS point of view it is only one thread. Smalltalk inside manages itself the different process and the schedule about it. Check classes like Processor, Scheduler, etc. So...what I am saying that if you want to kill a thread from outside, you will kill the only thread, the whole VM ;)


Try sending an interrupt. See http://wiki.squeak.org/squeak/899 for the shortcut for your platform (i.e. underlying OS).

Also, you probably mean "throw out this image" instead of "this VM". Pharo By Example is a great free resource for Smalltalk basics like image vs. changes file vs. VM

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜