Re: [Vala] Parameter variables in async functions aren't preserved



I would imagine that the parameter is not used, it is optimized according to the yield.

But that would have to be the same with a non-async method.


Nice Day
Wolfgang


Am 07.02.19 um 21:56 schrieb rastersoft:
Hi all:

I did an async function and after a yield I tried to use one of the parameter variables, but they contain garbage after that call (at least in the case of an string array).

An example:

async void a_test(string[] a_list) {

    // here a_list contains the right data

    yield another_async_function();

    // now a_list contains garbage

}

The documentation doesn't mention this. Is this something expected, or a bug?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]