Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

20
LINES

< > BotCompany Repo | #1007057 // Test sendToAll

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Libraryless. Click here for Pure Java version (5939L/40K/134K).

1  
!7
2  
3  
// to prevent endless loop!
4  
static L<S> processing = synchroList();
5  
6  
p-tt {
7  
  sendToAll("how are you");
8  
  bot();
9  
}
10  
11  
static S answer(S s) {
12  
  if (processing.contains(s)) null;
13  
  processing.add(s);
14  
  try {
15  
    L<S> l = sendToAll(s);
16  
    ret "sent to " + n(l, "bots");
17  
  } finally {
18  
    processing.remove(s);
19  
  }
20  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1007057
Snippet name: Test sendToAll
Eternal ID of this version: #1007057/5
Text MD5: e8beffd95b04c0d46f1538b7611a635e
Transpilation MD5: 9ec47e49f88ce61f5082a19f1e239fcd
Author: stefan
Category: javax / bots
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-02-27 17:31:56
Source code size: 334 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 455 / 544
Version history: 4 change(s)
Referenced in: [show references]