Multithreading in ASP.NET app???

C

Cor Ligthert [MVP]

I typed "realy" and thought "workerprocess"
What is your advantage in this, that really should in my opinion really be
hug if it is in an ASPNET application more than the processing needed for
the threads and the checking of those are ready(it is not your code
however what is needed)?
What is your advantage in this, that workerprocess should in my opinion
really be hug if it is in an ASPNET application and use more time than the
................................................................

By the way if you need data only for showing, than you can set your data in
a shared/static class.

That data stays in your server as long as there are sessions active for your
application (including session time). So you have to make a procedure in a
way that it refresh if the application stops. If it is a 24 hours used
application (which never will stop), than you have also to make something to
force cleaning up.

If you need a sample for this, reply than I copy something (although that is
than simple VB.Net).

I hope this helps,

Cor
 
J

John Bailo

Jon Skeet [C# MVP] wrote:

Instead of starting separate threads and assuming
they'll continue, the OP will need to queue the data in a more robust
way (eg to the file system or MSMQ) before returning, possibly
processing it in a different process altogether.

Why bother, when he can can easily, as I have, create his own thread pool?
 
J

Jon Skeet [C# MVP]

John Bailo said:
Why bother, when he can can easily, as I have, create his own thread pool?

Because having your own thread pool doesn't help if IIS decides to kill
your process.
 
E

Eliyahu Goldin

Jon,

I am using FSW extensively in a multi-threaded Windows service project. It
has been deployed to numerous client sites and there are no known
FSW-related problems. I think the problems you and the other poster are
observing could be caused by your handling FSW events rather than its faulty
behavior.

I do have a backup polling thread just in case if FSW misses something.

Eliyahu
 
J

Jon Skeet [C# MVP]

Eliyahu said:
I am using FSW extensively in a multi-threaded Windows service project. It
has been deployed to numerous client sites and there are no known
FSW-related problems. I think the problems you and the other poster are
observing could be caused by your handling FSW events rather than its faulty
behavior.

FSW has been observed to be problematic by many people. In my case, the
event handling is very simple indeed. There may well be some scenarios
where it works perfectly and some where it doesn't, depending on which
events are being listened for and what is actually occurring.

Given the number of people who've had problems (and these aren't
novices, btw) I think it's reasonable to suppose that there are genuine
problems in FSW.
I do have a backup polling thread just in case if FSW misses something.

Does that mean you might not have seen any FSW problems even if they're
occurring?

Jon
 
M

MikeAmundsen

check out MSMQ with Triggers. i use them in a number of cases where i
want to post a 'job' via the web and have the server process the
details async or at some later time.

google: MSMQ Trigger example

and you should be able to find a few code examples to work with.
 
J

Jon Skeet [C# MVP]

John Bailo said:
Same here.

I use FSW in windows services for monitoring ftp transfers and its
always worked flawlessly.

Several people have reported updating UI controls from worker threads
without problems - until they hit a problem. Something working for you
(so far) doesn't prove there isn't an issue.
 
J

John Bailo

Jon said:
Several people have reported updating UI controls from worker threads
without problems - until they hit a problem. Something working for you
(so far) doesn't prove there isn't an issue.

Yes, but I think here the burden of proof would be on the skills of the
person writing the threaded application, before I go an accuse a .NET
class (which is used by millions beyond this ng) as being flawed.
 
J

Jon Skeet [C# MVP]

John said:
Yes, but I think here the burden of proof would be on the skills of the
person writing the threaded application, before I go an accuse a .NET
class (which is used by millions beyond this ng) as being flawed.

And if I could reproduce the problem reliably, I'd do just that.
However, as tends to be the case with this kind of issue, reproducing
it in isolation is extremely tricky.

I understand your reluctance, but I'm no threading slouch myself and
the other MVPs who I've seen complaining of problems with FSW are
likewise skilled developers.

In the case I'm thinking of (which I can't unfortunately post the code
for) the code is extremely simple, and I've been through it very
carefully several times. Maybe I'll have a go at reproducing it at
home, and see what I can do - it would certainly be useful to have it
fixed.

Jon
 
J

John Bailo

Same here.

I use FSW in windows services for monitoring ftp transfers and its
always worked flawlessly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top