java - Abort the function call if it running in multiple threads -
i setting sessiontimeout function in jsp page call other jsp page using iframe on click of button in other jsp page have sessiontimeout function. because of function running in parallel. can me if there way "if same function called multiple times in different threads should cancel other thread , access latest thread".
i have tried using synchronised method wont allow me use until function completed cant use synchronise
can me regarding this?
javascript running in different iframe not guaranteed run in same thread each browser engine implementation.
you might need build task management utility in parent window keep track of iframe instances , sessiontimeout function running state (keep state in array/map). since script inside parent , iframes single threaded in context, can check state of each iframe before fire sessiontimout function in iframes.
in case need cross-domain iframe communication, can read post @ http://www.codeproject.com/tips/585663/communication-with-cross-domain-iframe-a-cross-bro
Comments
Post a Comment