Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] did you consider using lua coroutines to force some things to run async (like db queries) while for

[DiscordArchive] did you consider using lua coroutines to force some things to run async (like db queries) while for

[DiscordArchive] did you consider using lua coroutines to force some things to run async (like db queries) while for

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
02-15-2024, 04:11 PM
#1
Archived author: Tea • Posted: 2024-02-15T16:11:37.991000+00:00
Original source

did you consider using lua coroutines to force some things to run async (like db queries) while for users they look like regular sync calls?
rektbyfaith
02-15-2024, 04:11 PM #1

Archived author: Tea • Posted: 2024-02-15T16:11:37.991000+00:00
Original source

did you consider using lua coroutines to force some things to run async (like db queries) while for users they look like regular sync calls?

rektbyfaith
Administrator
0
02-15-2024, 04:17 PM
#2
Archived author: jackpoz • Posted: 2024-02-15T16:17:06.453000+00:00
Original source

I'm wondering also if you push to the stack any unsafe pointer like Creature* or how you handle that
rektbyfaith
02-15-2024, 04:17 PM #2

Archived author: jackpoz • Posted: 2024-02-15T16:17:06.453000+00:00
Original source

I'm wondering also if you push to the stack any unsafe pointer like Creature* or how you handle that

rektbyfaith
Administrator
0
02-15-2024, 04:35 PM
#3
Archived author: Foe • Posted: 2024-02-15T16:35:06.942000+00:00
Original source

Yes, we implemented async db queries with callbacks, that was part of this big refactor
rektbyfaith
02-15-2024, 04:35 PM #3

Archived author: Foe • Posted: 2024-02-15T16:35:06.942000+00:00
Original source

Yes, we implemented async db queries with callbacks, that was part of this big refactor

rektbyfaith
Administrator
0
02-15-2024, 04:35 PM
#4
Archived author: Foe • Posted: 2024-02-15T16:35:43.436000+00:00
Original source

Creature is safe within the context of the map they belong to, once a unit is destroyed we remove their bindings before the object is deleted
rektbyfaith
02-15-2024, 04:35 PM #4

Archived author: Foe • Posted: 2024-02-15T16:35:43.436000+00:00
Original source

Creature is safe within the context of the map they belong to, once a unit is destroyed we remove their bindings before the object is deleted

rektbyfaith
Administrator
0
02-15-2024, 04:36 PM
#5
Archived author: Foe • Posted: 2024-02-15T16:36:42.888000+00:00
Original source

On async queries though, we don't run coroutines, but we use the internal query processor
rektbyfaith
02-15-2024, 04:36 PM #5

Archived author: Foe • Posted: 2024-02-15T16:36:42.888000+00:00
Original source

On async queries though, we don't run coroutines, but we use the internal query processor

rektbyfaith
Administrator
0
02-15-2024, 04:37 PM
#6
Archived author: Foe • Posted: 2024-02-15T16:37:34.765000+00:00
Original source

I'd much rather just have them be async and not abstract it away to look like synchronous calls, and end users just have to learn to use callbacks
rektbyfaith
02-15-2024, 04:37 PM #6

Archived author: Foe • Posted: 2024-02-15T16:37:34.765000+00:00
Original source

I'd much rather just have them be async and not abstract it away to look like synchronous calls, and end users just have to learn to use callbacks

rektbyfaith
Administrator
0
02-15-2024, 04:38 PM
#7
Archived author: Tea • Posted: 2024-02-15T16:38:43.432000+00:00
Original source

what i mean is something like this (no callbacks)
```lua
local result = AuthDBQuery("SELECT bar FROM foo WHERE baz = 42069") -- actually a hidden coroutine
-- do stuff with result
```
rektbyfaith
02-15-2024, 04:38 PM #7

Archived author: Tea • Posted: 2024-02-15T16:38:43.432000+00:00
Original source

what i mean is something like this (no callbacks)
```lua
local result = AuthDBQuery("SELECT bar FROM foo WHERE baz = 42069") -- actually a hidden coroutine
-- do stuff with result
```

rektbyfaith
Administrator
0
02-15-2024, 04:38 PM
#8
Archived author: Tea • Posted: 2024-02-15T16:38:57.190000+00:00
Original source

without even allowing scripters to ever execute a sync query
rektbyfaith
02-15-2024, 04:38 PM #8

Archived author: Tea • Posted: 2024-02-15T16:38:57.190000+00:00
Original source

without even allowing scripters to ever execute a sync query

rektbyfaith
Administrator
0
02-15-2024, 04:39 PM
#9
Archived author: Foe • Posted: 2024-02-15T16:39:25.058000+00:00
Original source

Yeah I understand, I'm personally not a fan tbh, but it might be something to consider for the current synchronous queries in the future
rektbyfaith
02-15-2024, 04:39 PM #9

Archived author: Foe • Posted: 2024-02-15T16:39:25.058000+00:00
Original source

Yeah I understand, I'm personally not a fan tbh, but it might be something to consider for the current synchronous queries in the future

rektbyfaith
Administrator
0
02-15-2024, 04:39 PM
#10
Archived author: Tea • Posted: 2024-02-15T16:39:41.277000+00:00
Original source

the motivation here being forbidding synchronous queries more than anything else
rektbyfaith
02-15-2024, 04:39 PM #10

Archived author: Tea • Posted: 2024-02-15T16:39:41.277000+00:00
Original source

the motivation here being forbidding synchronous queries more than anything else

Pages (2): 1 2 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)