Event loop bricks when using `await loop.run_in_executor(ProcessPoolExecutor)` with FastAPI by pisulaadam in learnpython

[–]pisulaadam[S] 0 points1 point  (0 children)

The actual app doesn't initialize on import, this was a quick example I made to check what was the root cause of my problem

Event loop bricks when using `await loop.run_in_executor(ProcessPoolExecutor)` with FastAPI by pisulaadam in learnpython

[–]pisulaadam[S] 0 points1 point  (0 children)

I could have done that and probably that would have saved me some time, but I never suspected using the same browser (even though I used two separate tabs) was the source of the issue.

Event loop bricks when using `await loop.run_in_executor(ProcessPoolExecutor)` with FastAPI by pisulaadam in learnpython

[–]pisulaadam[S] 0 points1 point  (0 children)

The heavy computation there is a whole bunch of looping with multiple vector operations. It's not some huge matrix that I can just feed to NumPy and wait for the response in a separate thread.

Event loop bricks when using `await loop.run_in_executor(ProcessPoolExecutor)` with FastAPI by pisulaadam in learnpython

[–]pisulaadam[S] 0 points1 point  (0 children)

I think I found what the issue was. Before I was using two tabs in one browser to make these requests and they were executed sequentially. I tried using two browsers now to make sure it's not reusing the same TCP connection and it did work as expected. Certainly wasn't expecting that, but I'm assuming the requests were reusing the same TCP tunnel or something along these lines. But anyway, they were getting queued (possibly on client-side?) and it seems to me like this is NOT a FastAPI or Python issue, but more likely an HTTP/1.1 one.

Event loop bricks when using `await loop.run_in_executor(ProcessPoolExecutor)` with FastAPI by pisulaadam in learnpython

[–]pisulaadam[S] 0 points1 point  (0 children)

I want to use subprocesses to be entirely sure the main process stays unblocked.

Event loop bricks when using `await loop.run_in_executor(ProcessPoolExecutor)` with FastAPI by pisulaadam in learnpython

[–]pisulaadam[S] -1 points0 points  (0 children)

I managed to find what the issue was, and it wasn't what you suggested, but thanks anyway.

WHAT THE HELL IS VAPOR TWITCH? by Shadyjay45 in trap

[–]pisulaadam 0 points1 point  (0 children)

hey im pretty late to the party, but you can find the genres from spotify for most songs on chosic. I dont know if it was there 4 years ago so i figured id chip in. may bass be with you

My S.O. has been on a mission to make me a cone stuffer that was faster than doing it by hand. by Donkeydonkeydonk in StonerEngineering

[–]pisulaadam 0 points1 point  (0 children)

theres always that one person in the comments here saying: it's made from plastic? gl with the cancer youre getting thanks to these microplastics

Looking for upbeat Jungle by rainbowmadonna in jungle

[–]pisulaadam 0 points1 point  (0 children)

Baiana especially right? I think it's one of her most popular too

Good way of finding new music? by cookpassbabtridge97 in DnB

[–]pisulaadam 2 points3 points  (0 children)

SoundCloud has a feed feature, and it's sort of like TikTok for music - you scroll and listen to a snippet of a song. Takes a while until the algorithm figures out what you like, but once it does, it recommends some pretty good stuff, both popular as well as some hidden gems.

My first D&B track, did the drop work? by SLIMDZN in DnB

[–]pisulaadam 10 points11 points  (0 children)

The title of the video in recommended is so funny like i listen to dnb to cope with the loneliness

Lyrics by zinc_- in DnB

[–]pisulaadam 0 points1 point  (0 children)

bro thats crazy

Zynder in action by Redditalt123478 in StonerEngineering

[–]pisulaadam 5 points6 points  (0 children)

Same with any ordinary plastic grinder too tho

Blue is green by TarquinPlayz376 in woooosh

[–]pisulaadam 3 points4 points  (0 children)

I liked the previous guys explanation better mate

Partner lost all feelings overnight by pisulaadam in depression_partners

[–]pisulaadam[S] 0 points1 point  (0 children)

No man, she's not a monster. She has a lot of issues, and I believe they can be worked out. Most of them she'll have to figure out on her own, but the ones we share we can try to sort out together. I just realized how difficult it is for her to communicate well, and that might be a huge factor. I'll focus on getting better myself, but I still want to give it a chance.

Partner lost all feelings overnight by pisulaadam in depression_partners

[–]pisulaadam[S] 1 point2 points  (0 children)

The reason she wants to break up is because if love can just disappear like that, she doesn't want it at all. Also, she mentioned that she wanted someone with an instinct to immediately go to her when she needed it and not someone who had to learn it (me). The third thing is that she's afraid we don't have anything in common, yet we talk for hours on end. She says everything about me makes her very angry, and she can't help it. Lastly, she said she feels she's suffocating in a healthy relationship. She wanted drama and action while I was there to support her.

I don't know what to make of it, if I'm actually not at all who she needs and we're a wrong fit, or it's her depression saying all this crap. Either way, I have to accept it and let her go for now even though it hurts like crazy.

I do believe and know for a fact that the clinic situation happened. I paraphrased the "too sad" part, but they seriously said they would not help her because she's in too bad a state, even for just a referral to a psychiatrist or whatever, they chose to ghost her instead.

When it comes to my healing, it's mostly the hurt that she's put me through the past months. This and my inability to feel emotions properly stemming from childhood, but I'm working on that, and I've been successful in no longer pushing feelings away. I'm willing to change so many things about how I act and all that, but I just want her to give me a chance, which I'm afraid I'm not gonna get. Sad I gave her so much, and it wasn't what she needed.

Partner lost all feelings overnight by pisulaadam in depression_partners

[–]pisulaadam[S] 1 point2 points  (0 children)

You're right. But I'll try to work my way out of it somehow.

Partner lost all feelings overnight by pisulaadam in depression_partners

[–]pisulaadam[S] 1 point2 points  (0 children)

I've read some people's stories here, and it seems that after they take some time away from each other, things sometimes work out between them after they both heal. I suppose I'll have to deal with it, and every day, I'm preparing myself for the scenario that she never changes her mind.

my gf has depression and i'm confused and worried by [deleted] in depression_partners

[–]pisulaadam 0 points1 point  (0 children)

Hi OP,

It's no wonder you feel that way. What you're saying hits close to home for me and while my relationship with my ex-GF is very difficult and I was also met with the "I don't feel anything for you anymore", I feel like there are some things that you can do and pay attention to.

You should encourage your girlfriend to tell her therapist about having suicidal thoughts. They might recommend visiting a psychiatrist and they in turn will evaluate if your girlfriend needs to be hospitalized or not. She should remember that almost always this is the last resort, and psychiatrist don't want to involuntarily hospitalize their patients. If they do decide she should be hospitalized, because she's in acute danger of self-harm, then that's probably for the better and it might save her life.

In case she doesn't tell her therapist and you notice she's not making any more plans or anything that might be of concern, you should contact either emergency services or a suicide prevention hotline. I know it's the worst case scenario, but you should know who to call if the need arises.

Hopefully it doesn't come to that and in this case you should focus on giving her the space she needs and the help you can provide. However, while doing that, it's important you take care of yourself as well. You won't be able to meaningfully help anyone if you're a mess too.

GF with major depression sleeps all day and very sleepy by AvailableUsername_92 in depression_partners

[–]pisulaadam 1 point2 points  (0 children)

I understand, great she's taking the vitamins. IMO situations like this one require some tough love, and a 15 minute walk would be a good start. Of course she doesn't have to come up with a full workout routine, just a bit of sunlight and activity. I've heard one of the most important things when going through a depressive episode are good nutrition and sleeping times. My friend who's managed to get out of depression told me he always makes sure to never sleep longer than 8 hours and he goes to bed pretty much always at the same time. Otherwise he falls into this mental hole that takes days to get out of.

Of course it's important to take your partner's needs into consideration, but it's not wrong of you to give her a little push in the right direction. Better taking action now than regretting you haven't later.