What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
I was thinking of using the shiny new [flash concurrency](http://www.bytearray.org/?p=4423) for the purpose of having a dedicated worked thread for blitting.
It’s not like the worker thread actually unlocks any functionality that I couldn’t achieve by simply having the main loop do the game update and blitting alone, but by having a second thread the game will obviously run better on multicore CPUs.
However, I cannot find any information about how the flash worker threads are actually distributed across any potential CPU cores. I guess it’s up to the OS? But what I’m afraid of is that my dedicated blitting worker might end up on the same core as my main worker, removing the gains I would potentially get. Does anybody know if a thread can be “pushed” over to another core once it’s been established, if the OS finds that one core is overworked while another one hangs unused? Or is there any way to hint to the OS that these two threads should be on different cores?
Since it has the `isSupported`, I would assume that it leaves it up to the OS to place. If anyone has a single core that is single threaded(?) machine it would be cool if they could test to see if isSupported is false.
Indeed it can, in fact, a single core can even appear as more than one core, aka hyper-threading. My netbook has a dual core processor but in task manager I have 4 CPUs to assign my processes onto (I guess this sorta implies that a proccess can be moved from one core to another without being restarted?).
I wanna unlock more power for my application, not just multi-thread it for fun, as it runs just fine as a single thread. If both threads runs on the same core I’m not gaining anything at all, bar some overhead for making sure the two threads behave nicely to each other.
Pretty sure moving threads between cores mid-way through excecution will result in a context switch at both ends, thus costing time which may not make up for the performance advantage for that particular pair of quantums. It would however make sense to force-assign a program thread to a given processor thread before execution begins (let me know if there is such functionality available); however if this is not possible, then I really wouldn’t go to too much effort trying to micromanage your concurrency.
Also remember to take the necessary precautions to make your concurrent system safe in terms of thread management.
Hmm, even if the moving of threads mid-way is costy, it’s not something that would happen continuously, just a one time cost. But it would really be great to be able to tell the flash VM to create the second thread on another core, if available.
I expect process management is not for Flash but for the OS itself. A separate Flash Player is a thread or a process, controllable by OS. So this option is there and on by default, you just can’t see it in Flash. :)