Right now I do the following ``` @JvmStatic @Throw...
# coroutines
d
Right now I do the following
Copy code
@JvmStatic
@Throws(NullPointerException::class)
fun getCardById(dbfId: String): Deferred<Optional<Card>> = async(Unconfined)
{   
            getCards() // returns a list
                    .parallelStream()
                    .filter { it.cardId == dbfId }
                    .findFirst()
}