Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: samples/chat/chat_server.dart

Issue 27215002: Very simple version of Isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/symbols.h ('k') | samples/chat/chat_server_lib.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/chat/chat_server.dart
diff --git a/samples/chat/chat_server.dart b/samples/chat/chat_server.dart
index 537068b14bef9b983f0be6e8104e3e041f2d093f..c581538a99b56af8ee00a9e073a71050f7e6425e 100644
--- a/samples/chat/chat_server.dart
+++ b/samples/chat/chat_server.dart
@@ -16,12 +16,13 @@ void main() {
// stopAfter for that.
int stopAfter;
- var serverPort = spawnFunction(startChatServer);
- ServerMain serverMain =
- new ServerMain.start(serverPort, DEFAULT_HOST, DEFAULT_PORT);
+ spawnChatServer().then((serverPort) {
+ ServerMain serverMain =
+ new ServerMain.start(serverPort, DEFAULT_HOST, DEFAULT_PORT);
- // Start a shutdown timer if requested.
- if (stopAfter != null) {
- new Timer(new Duration(seconds: stopAfter), serverMain.shutdown);
- }
+ // Start a shutdown timer if requested.
+ if (stopAfter != null) {
+ new Timer(new Duration(seconds: stopAfter), serverMain.shutdown);
+ }
+ });
}
« no previous file with comments | « runtime/vm/symbols.h ('k') | samples/chat/chat_server_lib.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698