1 | static volatile int smartBotsChat_n_value; |
2 | static Lock smartBotsChat_n_lock = lock(); |
3 | static L smartBotsChat_n_onChange = synchroList(); // runnables |
4 | |
5 | static int smartBotsChat_n() { |
6 | ret smartBotsChat_n_notify(toInt(loadPage("http://botcompany.de/1011975/raw/n"))); |
7 | } |
8 | |
9 | static int smartBotsChat_n_notify(int n) { |
10 | bool changed = false; |
11 | if (n > smartBotsChat_n_value) { |
12 | lock smartBotsChat_n_lock; |
13 | if (n > smartBotsChat_n_value) { |
14 | smartBotsChat_n_value = n; |
15 | changed = true; |
16 | } |
17 | } |
18 | if (changed) |
19 | pcallF_all(smartBotsChat_n_onChange); |
20 | ret n; |
21 | } |
22 | |
23 | svoid smartBotsChat_n_onChange(O r) { |
24 | if (smartBotsChat_n_value == 0) smartBotsChat_n(); |
25 | setAdd(smartBotsChat_n_onChange, r); |
26 | } |
Began life as a copy of #1010815
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: | #1011980 |
Snippet name: | smartBotsChat_n |
Eternal ID of this version: | #1011980/1 |
Text MD5: | 540505782be2c5a9e8311158adfccab3 |
Author: | stefan |
Category: | javax / chat |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-14 03:42:45 |
Source code size: | 730 bytes / 26 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 430 / 455 |
Referenced in: | [show references] |