Worker does not work so well

Hi everyone,
     I am trying to decrypt an encrypted video in my opne-source project SparrowPlayer(https://github.com/yatsen-yang/SparrowPlayer),and I found that decrypting the video may block the main thread for several seconds.It resulted in stopping renderring UI assets on the stage, which is unacceptable.So I think 'Worker' may do some help. I followed the example code of the online API about Worker(http://help.adobe.com/zh_CN/FlashPlatform/reference/actionscript/3/flash/system/Worker.htm l). I tested and it worked well.
     But I found that if I embed the BGWorker.swf in other class like com.xx.Test instead of in the document class, 'Worker' did not work so well.Sometimes main worker could not communicate with bgworker even that the state of bgworker is running.
The example code followed:
    private function handleBGWorkerStateChange(event:Event):void
          if (bgWorker.state == WorkerState.RUNNING)
                  _statusText.text = "Background worker started";
                 bgWorkerCommandChannel.send(["startCount", 100000000]);
    It happened sometime, not everytime. If main worker send a message after 1 second when listerning that the state of bgworker is running, the code works well
    So it confused me. Logically, if the state of bgworker is running, it should mean that main worker can communicate with bgworker, and it works well if you embed the bgworker swf in the document class.But if you embed the bgworker swf in other class, you will have problem sometime.
    Finally, I found a solution.I embed the bgworker swf in other class instead of in the document class, and when bgworker initializes succesfully, it send a message to main worker.Main worker communicates withe bgworker immediately if it  receives the message coming from bgworker.Now the problem is solved.
    I want to know why the state of Worker not reliable when I embed the bgworker swf in other class.Is it a bug of Worker?   
    thanks

We would need to debug it to definitively understand the problem.  I would recommend filing a bug with a simplified example that demonstrates the problem.  If you post the bug number here, I'll escalate it to the engineering team.
Also, have you tried multiple browsers?  We can always do that triage here, but it would be an interesting data point.

Similar Messages

  • Identical code works/does not work in different forms

    This piece of code works fine in one form but not in another : OVTtunnus1.rawValue = "0037" + Ytunnus1.rawValue.replace(/-/g, "");
    If I comment it, no error. So, there is no other factors to produce the error.
    Error :
    Ytunnus1.rawValue is null
    1:XFA:form1[0]:Aliyritys[0]:OVTtunnus1[0]:enterException in line 1 of function top_level, script XFA:form1[0]:Aliyritys[0]:OVTtunnus1[0]:enter
    Erkki

    The PL/SQL of Forms/Reports is based on old version SQL,
    does not support subquery in select-clause.
    Let it transform to outer join.
    select em1.mreading, em1.grid_code
    ,em.mreading as Yreading
    where em.grid_code(+)=em1.grid_code
    and em.transformer_code(+)=em1.transformer_code
    and em.bus_bar(+)=em1.bus_bar
    and to_date(to_char(em.r_date(+),'dd/mm/yyyy'),'dd/mm/yy') = to_date('02/01/07' ,'dd/mm/yy') - 1)
    and to_date(to_char(em1.r_date,'dd/mm/yyyy'),'dd/mm/yy')= to_date('02/01/07' ,'dd/mm/yy')
    ;

  • Gifting 'whole work' does not work

    I don't know if anyone else has run into this issue, but it is very frustrating. I tried writing to the itunes store for support, but was answered with a form letter that did not in any way try to address my issues, so I am posting here for 'support,' to avoid further frustration with this, while I await another response from itunes personnel. Here is the longish version, so please bear with me. I wanted to make a gift of a classical work to a friend, but first I wanted to see what that gift would look like coming from Apple, and I also wanted to make sure I liked it enough to give it. So I opened a second itunes account for myself and tried giving myself the gift first. I selected the 'whole work' option from the itunes list, moved it into the playlist I had created for this purpose, clicked the arrow to the right of that playlist folder and continued to select it as a gift to my other account. What I got was just the second and third movements of the work, the first movement was not included. I played around with this and found that indeed it would not work to purchase the whole three movement work as a gift, even though in the itunes listing, it said that if you wanted that first movement, you would have to purchase it as part of the whole work. It just wouldn't do it though. So, as an experiment, I tried purchasing the whole work directly, right into my account, my computer, not as a gift to myself or anyone else. And, well, that worked. So, why can't I purchase it as a gift? And if it just isn't possible to do this, why is that? How come I can buy it for myself and not for someone else? I'd really like to understand this. Thanks in advance for any insight.

    What you are looking for is the Work Area Bar (WAB). You can then set the Export/Share to only the Work Area for most Export formats. Do not forget to do this. It's usually with a drop-down, or a checkbox.
    Good luck,
    Hunt

  • Bluetooth does not work well after upgrade to win 8.1 from win 8

    System:                       Dell Inspiron 15R 5520
    Bluetooth hardware:   Intel(R) Centrino(R) Wireless Bluetooth(R) 4.0 + High Speed Adapter
                                         Microsoft Bluetooth Enumerator
    Ever since I upgraded from Win 8 to 8.1, the bluetooth has not been working well.
    The option to browse a remote folder or send a file does not work. 
    I can send a file only by opening the contaning folder, right click, and send to bluetooth, but cannot receive a file unless I go to
    run and then open fsquirt.exe .
    I have unpaired and uninstalled the devices respectively, and then reinstalled and repaired them. But this does not work .either.
    Unfortunately, I am unable to paste  screenshots of the device manager and error messages until I am verified.
    Can anyone give me a solution to this problem?

    Verify that you have the latest drivers for Windows 8.1 installed from the manufacturer's website.
    http://www.dell.com/support/drivers/us/en/19/Product/inspiron-15r-5520

  • Safari 5.1.1 I no longer have access to my bookmark folders, just a search that does not work well. How can I retrieve access to bookmark folders?

    OS 10.6.8 Safari 5.1.1 I no longer have access to the bookmark folders. There is just a search function that does not work well. Is there any way to get access back to my bookmark folders?

    This site didn't say anything about one wrong ID, but only talks about changing the Apple ID.  If it didn't work the first time why should it work now?

  • How can I OPEN files I just downloaded? They're on the DOWNLOADS screen of Firefox but I can't open them even after double-clicking? And they're not on the FOLDERS as well. I tried RIGHT-CLICK and the "open dowloading folder" or something does not work! P

    How can I OPEN files I just downloaded? They're on the DOWNLOADS screen of Firefox but I can't open them even after double-clicking? And they're not on the FOLDERS as well. Even the right-click is not working ... the "open containing folder" does not work.
    == This happened ==
    Not sure how often
    == ALWAYS! ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)

    Open Containing Folders is never active.

  • Adobe Fourms does not work with Opera too well

    Adobe Fourms does not work with Opera too well.  I have to use in Opera "Identify as Firefox just to post this message!
    I also have run into the same junk with Hotmail.
    Web Design Tip:  Always code for Opera and all other browsers will fall in line most of the time.

    dave milbut wrote:
    of course you're right east texas. hadn't noticed that. bad bad adobe. someone smack them with a rolled up news paper on the snout!
    I've installed a button in my Firefox tool bar to toggle iFrames on and off through a Firefox add-on called "Toolbar Buttons".
    The forum Reply Editor does not work when iFrames are blocked, so I need to toggle them back on when posting, then back off.  I imagine that's better than having them on all the time.
    Message was edited by: Ramón G Castañeda

  • TA48312 now my iphone4 version is 6.0.1, personal hotspot does not works well as before, so i want to upgrade back to the old version 4.3.5,please help me

    now my iphone4 version is 6.0.1, personal hotspot does not works well as before, so i want to upgrade back to the old version 4.3.5,please help me.

    Downgrading is Not supported by Apple.
    Unauthorized modification of iOS
    http://support.apple.com/kb/HT3743

  • My iPhone 6 panoramic camera does not work properly: the arrow does not turn when i turn my phone. Furthermore sonetti da my Keyboard does not turn as well. What do you think si the problem?

    My iPhone 6 panoramic camera does not work properly: the arrow does not turn when i turn my phone. Furthermore sonetti da my Keyboard does not turn as well. What do you think si the problem?

    Furthermore my keyboard does not turn sometimes as well

  • My new (2 months old) 5s fingerprint recognition sensor does not work. It worked well when I first got it but now to get it to work I have to redo my fingerprints every few days, which completely negates the convenience and cost of the phone.

    My new (2 months old) 5s fingerprint recognition sensor does not work. It worked well when I first got it but now to get it to work I have to redo my fingerprints every few days, which completely negates the convenience and cost of the phone.  I have tried all the tips and they help a little but it always stops working and I have to redo my fingerprints. Does Apple read these comments?  Is there an app that might help?

    Apple does not read here.
    If you want Apple to know send feedback
    http://www.apple.com/feedback/iphone.html
    I also have iPhone 5s on day one and it's working since. When it's not registering, I just clean the Home button and it works straight away.
    Did you try when registering fingerprint using all angles? It should learn the more you use it.
    Did you clean the sensor with a soft cloth?
    http://support.apple.com/kb/HT5883

  • I have just updated my iPhone to version 5.1, and the camera button next to the "slide to unlock" button does not work at all. It used to function well before the update. Can someone help??

    I have just updated my iPhone to version 5.1. After the update, the camera button next to the "slide to unlock" button does not work at all. It used to function well before the update. It happens to my friends as well. What should I do? Can someone help?? Thanks!!!!

    Slide the camera button up

  • Hi... i have iphone 5. my phone shows me the apple broken and does not work well . what this means? deppy

    hi... i have iphone 5. my phone shows me the apple broken and does not work well . what this means? deppy

    despoina kiato wrote:
    καμία φορά σταματάει να δουλεύει. σβήνει το κινητό και  μου δηχνει το μήλο σπασμένο.  απενεργοποιήτε  μόνο του . αυτό είναι όλο .
    Englidh would help.

  • AirPlay does not work with iPhone 4 s or iPad.Remote doesn´t work as well

    AirPlay does not work with iPhone 4 s or iPad.Remote doesn´t work as well.
    WLAN is working, I can use Youtube on my AppleTV, but I can´t connect to my computer or use airplay on my iPhone or iPad.

    Something is not configured correctly that is creating issues with your AppleTV.  You can disconnect it from the TV and power, and then plug it into your computer with a micro-USB cable.  After launching iTunes on your computer, you will be able to restore it to default settings and upgrade the software.

  • When you install Premiere Pro as the admin on an iMac the audio functionalities work well but a second admin account on the same machine does not work. What can I do to fix this?

    When you install Premiere Pro as the admin on an iMac the audio functionalities work well but a second admin account on the same machine does not work. What can I do to fix this?

    It is a bad idea to hack computer passwords when you don't own the computer
    Good luck with the school and the parents.

  • HT4061 If my flash does not work well will Apple fix it

    My iPhone  camera flash does not work well, will Apple fix this tin store?

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

Maybe you are looking for

  • My safari don't open certain pages

    Hello, I have a strange problem. I like to read newspaper in bangla language for example www.ittefaq.com.bd . My safari in the iPhone can easily open sites with bangla font but the safari in mac freezes with the rainbow circle every time i try to ope

  • Bridge Calendar not synching with device - missing entries

    Since the upgrade to OS 2 I have noticed that the calendar does not synch properly.  There are entries on the device (and outlook) that don't appear at all in the bridge calendar.  What is more strange is that sometimes some of them  do...but when th

  • Records Management   -   Adapter for UCM

    Hi there, I am having troubles understanding how the Records Management Adapter for UCM works: 1. I have installed URM on a separate instance and have defined retention categories there. 2. I installed the Adapter on a UCM instance and pointed it to

  • Blanket PO process - cant do MIGO

    Hello, I am trying to use the standard blanket PO process (FO doc type, with B item category)... However, when i go to the MIRO and pull in PO, the amount is automatically populating as ZERO, therefore i can not post invoice. The validate dates are c

  • Last update condition...

    Hi All I need to select the records who's last update date less than ( sysdate-90/1440) {Query} SQL> select present.object_type, present.object_id 2 from (select cb2.object_type, cb2.object_id, incident_status_name, 3 incident_severity_name 4 from cs