2

I'm wondering if the Appcelerator Titanium Hyperloop module can be used to spawn new threads or do background work that will not block the main UI thread? In other words, I have an expensive or long-running data processing task but I want to run it on a background thread. Previously Appcelerator Titanium has been single-threaded with no options for spawning new threads. With Hyperloop being able to call directly into native APIs I'm wondering if threads are now possible?

http://labs.appcelerator.com/project/55f74a9f421c44837717716b/Hyperloop-Module

Rene Pot
  • 24,681
  • 7
  • 68
  • 92
Kevin Southworth
  • 373
  • 2
  • 11

1 Answers1

0

Great question.

Currently, when using Hyperloop you WILL have to run the entire app on the Main Thread and threading is currently not possible, so everything will be on the main thread.

I do hope however that it will become a possibility in the future, and I heard it also crossed the minds at Appcelerator. I don't know though what the conclusion on the matter is.

So for now, it won't be possible. In the future, I hope so.

Edit (May 2016): There is a CSPEC currently with a proposal. We might see this in a future release

Rene Pot
  • 24,681
  • 7
  • 68
  • 92
  • ok, thanks for the reply. single-threading has been a big issue for us using Appc/Titanium so far :( – Kevin Southworth Feb 18 '16 at 17:44
  • Agreed. I too have plenty of stuff that needs offloading. I really hope a feature like this will be implemented soon – Rene Pot Feb 18 '16 at 22:29
  • @RenePot do you know what the implications on performance are when running on the Main Thread? AFAIK currently the UI is run on the main thread while JS runs on it's own thread - so seems like it would create a more unresponsive app. – developer82 Aug 15 '16 at 08:08