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

37
LINES

< > BotCompany Repo | #1020081 - dm_vmBus_onMessage_q - execute in module's queue

JavaX fragment (include)

ifclass VF1
static <A> AutoCloseable mapMethodLike dm_vmBus_onMessage_q(fS msg, final VF1<A> onMessage) {
  final DynModule m = dm_current_mandatory();
  ret dm_vmBus_onMessage(msg, voidfunc(final A a) {
    switch to m.q();
    callF(onMessage, a);
  });
}
endif

ifclass VF2
static <A, B> AutoCloseable dm_vmBus_onMessage_q(fS msg, final VF2<A, B> onMessage) {
  final DynModule m = dm_current_mandatory();
  ret dm_vmBus_onMessage(msg, voidfunc(final A a, final B b) {
    switch to m.q();
    callF(onMessage, a, b);
  });
}
endif

ifclass VF3
static <A, B, C> AutoCloseable dm_vmBus_onMessage_q(fS msg, final VF3<A, B, C> onMessage) {
  final DynModule m = dm_current_mandatory();
  ret dm_vmBus_onMessage(msg, voidfunc(final A a, final B b, final C c) {
    switch to m.q();
    callF(onMessage, a, b, c);
  });
}
endif

static <A> AutoCloseable dm_vmBus_onMessage_q(fS msg, final Runnable onMessage) {
  final DynModule m = dm_current_mandatory();
  ret dm_vmBus_onMessage(msg, voidfunc(final A a) {
    switch to m.q();
    callF(onMessage);
  });
}

Author comment

Began life as a copy of #1019799

download  show line numbers  debug dex   

Travelled to 4 computer(s): cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, tvejysmllsmz

No comments. add comment

Snippet ID: #1020081
Snippet name: dm_vmBus_onMessage_q - execute in module's queue
Eternal ID of this version: #1020081/8
Text MD5: 49fabca9f8818e212084f241fe606856
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-24 17:37:15
Source code size: 1093 bytes / 37 lines
Pitched / IR pitched: No / No
Views / Downloads: 82 / 92
Version history: 7 change(s)
Referenced in: [show references]