Skip to content

Commit

Permalink
Add '--max-task' to server examples. (#145)
Browse files Browse the repository at this point in the history
Better to expose the argument in examples to make sure users don't
forget about it on the host.
  • Loading branch information
floitsch authored Sep 18, 2024
1 parent 41fcb70 commit 82a80f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/server.toit
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ main:
// Listen on a free port.
tcp-socket := network.tcp-listen 0
print "Server on http://localhost:$tcp-socket.local-address.port/"
server := http.Server
server := http.Server --max-tasks=5
server.listen tcp-socket:: | request/http.RequestIncoming writer/http.ResponseWriter |
resource := request.query.resource
if resource == "/empty":
Expand Down
2 changes: 1 addition & 1 deletion src/server.toit
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ main:
// Listen on a free port.
tcp-socket := network.tcp-listen 0
print "Server on http://localhost:$tcp-socket.local-address.port/"
server := http.Server
server := http.Server --max-tasks=5
server.listen tcp-socket:: | request/http.RequestIncoming writer/http.ResponseWriter |
resource := request.query.resource
if resource == "/empty":
Expand Down

0 comments on commit 82a80f5

Please sign in to comment.