Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Make server Ctrl-C safe [patch]
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gracjan Polak  
View profile  
 More options Apr 20 2010, 1:43 am
From: Gracjan Polak <gracjanpo...@gmail.com>
Date: Tue, 20 Apr 2010 07:43:05 +0200
Local: Tues, Apr 20 2010 1:43 am
Subject: Make server Ctrl-C safe [patch]

Hi Jeremy and all,

Would be really good to include this patch before 0.5, as it really enables
GHCi-style development for GuestBook example app.

--
Gracjan

--
You received this message because you are subscribed to the Google Groups "HAppS" group.
To post to this group, send email to happs@googlegroups.com.
To unsubscribe from this group, send email to happs+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/happs?hl=en.

  make-server-ctrl_c-safe.dpatch
17K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeremy Shaw  
View profile  
 More options Apr 20 2010, 8:45 am
From: Jeremy Shaw <jer...@n-heptane.com>
Date: Tue, 20 Apr 2010 07:45:31 -0500
Local: Tues, Apr 20 2010 8:45 am
Subject: Re: Make server Ctrl-C safe [patch]
applied. Do you think we should add withSystemState' to happstack-
state ?

Also, I am not convinced this patch will really enable GHCi style  
development. In my experience, killing the main http thread does not  
actually stop the server from listening, because there are other  
threads still listening. And even if you reload/restart the  
application, your request might be handled by an old thread? As a  
result, you are force to completely restart GHCi between runs :(

There is some code in Happstack.Util.Concurrent related to this  
problem -- no idea if it is actually useful though.

thanks for the patches though!
- jeremy

On Apr 20, 2010, at 12:43 AM, Gracjan Polak wrote:

--
You received this message because you are subscribed to the Google Groups "HAppS" group.
To post to this group, send email to happs@googlegroups.com.
To unsubscribe from this group, send email to happs+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/happs?hl=en.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gracjan Polak  
View profile  
 More options Apr 20 2010, 9:15 am
From: Gracjan Polak <gracjanpo...@gmail.com>
Date: Tue, 20 Apr 2010 06:15:37 -0700 (PDT)
Local: Tues, Apr 20 2010 9:15 am
Subject: Re: Make server Ctrl-C safe [patch]

On 20 Kwi, 14:45, Jeremy Shaw <jer...@n-heptane.com> wrote:

> applied. Do you think we should add withSystemState' to happstack-
> state ?

I took it from happstack-extra and I'm all for putting it into
happstack proper!

> Also, I am not convinced this patch will really enable GHCi style  
> development. In my experience, killing the main http thread does not  
> actually stop the server from listening, because there are other  
> threads still listening. And even if you reload/restart the  
> application, your request might be handled by an old thread? As a  
> result, you are force to completely restart GHCi between runs :(

Well, works in devel scenario where I'm the sole user of the app. Kill
the logger (so files are closed), kills state (so files are closed)
and kills http thread (so port is freed and socket is closed). For
devel and debug this is enough!

BTW: killThread with httpPid really closes the socket, because
simpleHTTP has proper `bracket` where it should.

It is probably also correct in the compiled code case, when somebody
hits Ctrl-C then it tries to do rather clean exit.

> There is some code in Happstack.Util.Concurrent related to this  
> problem -- no idea if it is actually useful though.

I'll check that later, I've never looked inside this module before...

--
You received this message because you are subscribed to the Google Groups "HAppS" group.
To post to this group, send email to happs@googlegroups.com.
To unsubscribe from this group, send email to happs+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/happs?hl=en.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »