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

11
LINES

< > BotCompany Repo | #1031790 // vmBus_onMessages_many - try to avoid this, it slows the VM bus down generally

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3049L/17K).

static <A> AutoCloseable vmBus_onMessages_many(Collection<S> messages, final Runnable r) {
  final Set<S> set = asSet(messages);
  ret tempAdd(vm_busListeners_live(), voidfunc(S msg, O arg) {
    if (contains(set, msg))
      callF(r);
  });
}

static <A> AutoCloseable vmBus_onMessages_many(Runnable r, S... messages) {
  ret vmBus_onMessages_many(asHashSet(messages), r);
}

Author comment

Began life as a copy of #1019006

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031790
Snippet name: vmBus_onMessages_many - try to avoid this, it slows the VM bus down generally
Eternal ID of this version: #1031790/1
Text MD5: 2256616705ff00617d40cd7dab2d2b08
Transpilation MD5: f1b6adea29578e600ead48ced2c40d35
Author: stefan
Category: javax / vm
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-29 21:58:49
Source code size: 385 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 65 / 110
Referenced in: [show references]