C
Chris
Hi.
I have a ibrary I'm trying to use via javascript within IE. This
library uses an asynchronous model where I call into a function and
pass it a callback function as one of its arguments. My method returns
immediately, and the callback function is called shortly thereafter...
virtually immediately.
I want to find a way to simplify my code by finding a way to simulate
synchronous behavior for those functions. It's a little awkward to
have to string together calling functions and callbacks all over the
place, particularly when I need to maintain some kind of state between
those calls. The "user experience" is unlikely to suffer with a
synchronous model, IMO, since these async methods always return very
quickly.
So, how can I best simulate synchronous behavior when dealing with
asynchronous functions?
thanks,
Chris
I have a ibrary I'm trying to use via javascript within IE. This
library uses an asynchronous model where I call into a function and
pass it a callback function as one of its arguments. My method returns
immediately, and the callback function is called shortly thereafter...
virtually immediately.
I want to find a way to simplify my code by finding a way to simulate
synchronous behavior for those functions. It's a little awkward to
have to string together calling functions and callbacks all over the
place, particularly when I need to maintain some kind of state between
those calls. The "user experience" is unlikely to suffer with a
synchronous model, IMO, since these async methods always return very
quickly.
So, how can I best simulate synchronous behavior when dealing with
asynchronous functions?
thanks,
Chris