What happens to the task when a synchronous method returns?

I have a synchronous method which calls an async method (obviously without awaiting) and then returns. What happens to the task after that? Will it finish executing? Do I have to use something like 'RunSynchronously'?

reddit.com
u/angryvoxel — 4 days ago
▲ 3 r/opengl

Is it bad to use textures with highly disproportional dimensions?

I'm storing textures in an atlas, after loading a bitmap font with a gazillion unicode characters my rectangle packer decides that it's best to resize the atlas to something like 10000x10 to store all the characters and I'm wondering whether it would be better to try and keep the atlas square.

reddit.com
u/angryvoxel — 14 days ago

Constructing an object member without creating copies

Hello, this is kind of a stupid question but I still haven't found an answer. I have a member class with a rather large constructor and I'd like for it to be inside parent's constructor body rather than inside member initializer list (purely due to aesthetic reasons).

class ParentClass
{
  MemberClass Fatass;

  ParentClass() : Fatass(1, 2, 3, 4, 5...) //where I don't want it to be
  {
    ...
    Fatass = MemberClass(1, 2, 3, 4, 5...); //where I want it to be (but it can't be copied)
  }
}

However that member class can not be copied, so I have to construct it "in-place" and I haven't found a way to do that without using the initializer list. Is this possible?

reddit.com
u/angryvoxel — 2 months ago

Hello, I'm not an expert on data structures and algorithms so sorry if this is a very banal question. I'm looking for a pathfinding algorithm, it doesn't have to be mathematically perfect and return the shortest possible path in every case but it should be reasonably close and lightweight cause I plan to run it thousands of times. Here's the problem statement:

There's a rectangular 2D grid consisting of empty and filled cells and a starting point which may be anywhere on that grid. I want to generate a path which goes through all the filled cells atleast once and takes the least amount of steps. Each move forwards/backwards in a straight line takes one step while taking a turn takes another step. So for example if I decide to walk 5 cells east/west from the start and then walk 5 steps north/south it will take 11 steps in total.

reddit.com
u/angryvoxel — 4 months ago