This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main exposing (Model, Msg(..), init, main, subscriptions, update, view) | |
import Browser | |
import Debug exposing (log) | |
import Html exposing (Html, button, div, input, span, text) | |
import Html.Attributes exposing (class, placeholder, style, value) | |
import Html.Events exposing (onClick, onInput) | |
import List.Extra as Liste | |
import Task | |
import Time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final Context ctx = vertx.currentContext(); | |
otherLibrary.doSomethingAsync("foo", new Runnable() { | |
public void run() { | |
// This will be executed on the other library's thread so we need to make sure the result is done on the correct context | |
ctx.runOnContext(new Handler<Void>() { | |
public void handle(Void v) { | |
// Now we are on the right context - use the Vert.x API as normal | |
request.response().end("blah"); | |
} |