Skip to content
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

spotty promise resolution in IE9 #67

Open
calvinmetcalf opened this issue Jul 10, 2013 · 17 comments
Open

spotty promise resolution in IE9 #67

calvinmetcalf opened this issue Jul 10, 2013 · 17 comments

Comments

@calvinmetcalf
Copy link
Owner

breaking the non-script import part of #66 into it's own issue, basically this

  testWorker = cw (input, callback) ->
    console.log 'i am the worker ',input
    callback input+5

  testWorker.data(2).then (res) -> console.log res

  setTimeout ->
    testWorker.data(3).then (res) -> console.log res
  , 1000

  # Listen for socket event and update the
  # scope with the new data as processed by the above function
  $socket.on 'dataProcessingTrend', (theThing) ->  
    console.log 'chart update recieved'
    testWorker.data(4).then (res) -> console.log res

produces

   i am the worker 2 
   7 
   i am the worker 3 
   8 
   chart update recieved 
   i am the worker 4 
   chart update recieved 
   i am the worker 4 

@Fresheyeball what happends when you add a second callback to the worker inside the socket, ie

success = (data)->
   console.log 'yes ', data
failure = (data)->
    console.log 'no ', data
testWorker.data(4).then success,failure
@Fresheyeball
Copy link
Contributor

Ok, so I implemented the success and failure methods exactly as you have them and received the following in my console:

    i am the worker 2 
    yes 7 
    i am the worker 3 
    yes 8 
    chart update recieved 
    i am the worker 4 
    chart update recieved 
    i am the worker 4 
    chart update recieved 
    i am the worker 4 
    chart update recieved 
    i am the worker 4 

Looks like failure never fires either. Very odd.

@Fresheyeball
Copy link
Contributor

Also thank you so much for your help. Communist is proving to be an excellent lib and I am here to help as much as I can.

@calvinmetcalf
Copy link
Owner Author

if your able to post a jsfiddle that illustrates the error that would be helpful , and thanks for helping bug test it

@Fresheyeball
Copy link
Contributor

I will get that too you as soon as I can. Part to the issue there is that I am having trouble reproducing the problem. You will notice the setTimeout in my testcase, I am not sure what is unique about my event handler that screws up the promise. Once I have that figured out I can provide you a much better fiddle.

@Fresheyeball
Copy link
Contributor

Actually if you have any ideas about what might be unique about the southmost function in my testcase that could mess up the promise it would be very helpful.

@calvinmetcalf
Copy link
Owner Author

that's why I was asking about the fiddle I was curious about what that function is from, angular?

@calvinmetcalf calvinmetcalf mentioned this issue Jul 10, 2013
Merged
@calvinmetcalf
Copy link
Owner Author

so if I had to guess this would have to do with some of the ie9 stuff resolving synchronously instead of async so try this again it may have been fixed. Also now you can use console.log inside a worker.

@Fresheyeball
Copy link
Contributor

Will give it a shot tomorrow. Thanks for providing excellent support :)

@Fresheyeball
Copy link
Contributor

Sorry I have not gotten a chance to test yet. I will ASAP. please stand by.

@Fresheyeball
Copy link
Contributor

Ok, I've tested it. Promise is still not getting resolved in IE9.

@calvinmetcalf
Copy link
Owner Author

Ok so I need a fiddle from you then that reproduces it

@Fresheyeball
Copy link
Contributor

I'm working on it. Been swamped.

@calvinmetcalf
Copy link
Owner Author

also fyi #97 should in theory help with this (though it depends on the actual problem)

@calvinmetcalf
Copy link
Owner Author

@Fresheyeball this still a problem?

@Fresheyeball
Copy link
Contributor

@calvinmetcalf I don't know. I could not get past it and had to purge web workers for the time being. Additionally, and far less helpfully, I was unable to make the problem reproducible.

@calvinmetcalf
Copy link
Owner Author

damn that's double bad, I'm going to clone this issue for now, if you (or anyone else) is able to reproduce it I can open it back up.

@Fresheyeball
Copy link
Contributor

Sounds good. Pretty lame overall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants