One Subroutine after another

  • Thread starter Thread starter MRW
  • Start date Start date
M

MRW

Hello!

I'm running two subroutines one after another. The first subroutine
works and does something to a several session variables (just an
example), then those session variables are accessed by the second
subroutine.

I'm noticing however, that it looks like the second subroutine is being
called before the first is done.

Does anybody have any experience with this?

Thanks for any help!
 
No, I don't think that can happen. There must be something else going on
that is making you think that this is the case.
 
Okay, thanks... I wasn't too sure... I've programmed in Flash before
where things like that can happen if your not careful. Wasn't sure if
there was something similar in NET.

Thanks again!
 
Well it can happen, but it could probably only happen if routine 1 started
something asynchronous - an asynchronous (non-blocking) call to web service
perhaps or making use of an IHttpAsyncHandler that altered session on
completion. if it didn't wait for a return before exciting the method a
session enabled webservice method or an ihttpasync EndProcessRequest could
alter session values while the worker thread went on to execute routine 2!
However, you would have had to code this in and its not for the faint
hearted.

If your not coding that complex an application then its unlikely to be
executing routine2 before 1 completes.
-
Regards

John Timney (MVP)
 
Back
Top