PyQt5 after starting new thread, the main thread exitHow to check if current thread is not main threadQt processes signals after threads exit?JVM not exiting until daemon thread not completedMain thread not catching KeyboardInterruptIs there any order for Java main thread and user created thread execution?How to print some messages before and after thread iteration?C batch processing data and main thread wait for all sub-threadsExecutor Service and Main Thread not executing in parallelWhy is it that fewer threads finished than started in ExecutorService?Python threading neither exiting nor 'threading'

Why does this expression simplify as such?

PTIJ: Why is Haman obsessed with Bose?

How to draw a matrix with arrows in limited space

Why is so much work done on numerical verification of the Riemann Hypothesis?

Why should universal income be universal?

The Digit Triangles

Does Doodling or Improvising on the Piano Have Any Benefits?

The IT department bottlenecks progress, how should I handle this?

Has the laser at Magurele, Romania reached a tenth of the Sun's power?

Does "he squandered his car on drink" sound natural?

Why is the "ls" command showing permissions of files in a FAT32 partition?

Does the Linux kernel need a file system to run?

Has any country ever had 2 former presidents in jail simultaneously?

Is there any evidence that Cleopatra and Caesarion considered fleeing to India to escape the Romans?

Why do Radio Buttons not fill the entire outer circle?

Can I say "fingers" when referring to toes?

Is there a nicer/politer/more positive alternative for "negates"?

US tourist/student visa

Mimic lecturing on blackboard, facing audience

Microchip documentation does not label CAN buss pins on micro controller pinout diagram

A variation to the phrase "hanging over my shoulders"

Creating two special characters

Review your own paper in Mathematics

What (the heck) is a Super Worm Equinox Moon?



PyQt5 after starting new thread, the main thread exit


How to check if current thread is not main threadQt processes signals after threads exit?JVM not exiting until daemon thread not completedMain thread not catching KeyboardInterruptIs there any order for Java main thread and user created thread execution?How to print some messages before and after thread iteration?C batch processing data and main thread wait for all sub-threadsExecutor Service and Main Thread not executing in parallelWhy is it that fewer threads finished than started in ExecutorService?Python threading neither exiting nor 'threading'













0















 def pre_train(self, path):
self.newdata = load_metadata(path)
last_idx = self.embedded.shape[0]
embedded = np.zeros((self.metadata.shape[0] + self.newdata.shape[0], 128))
embedded[:self.embedded.shape[0]] = self.embedded
self.embedded = embedded
print(self.newdata.shape)


class FaceThread(QRunnable):
def run(self):
print("Start pre train")
self.worker.pretrain(self.path)
print("Training ")
self.worker.train()
print("Finish Train")

# main
self.thread = FaceThread()
self.thread.setPath(self.img_url)
self.thread.setWorker(self.worker)
QThreadPool.globalInstance().start(self.thread)


I use print function, find the thread really start execute, but after several seconds, the program will exit without any message. Who can help me explain about this? Is it too complicated about the sub thread? :)










share|improve this question









New contributor




LuoNet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • please provide a Minimal, Complete, and Verifiable example

    – S. Nick
    14 hours ago











  • sorry about the unclear edition, It will just output "start pre train". But when it go into worker.pretrain(), the program will exit(). (So, could it provide enough message about the issue?)

    – LuoNet
    13 hours ago











  • @LuoNet Have you created an eventloop with QCoreApplication, QGuiApplication or QApplication ?, the cause of the error could be many so if you want help you should provide an Minimal, Complete, and Verifiable example

    – eyllanesc
    9 hours ago
















0















 def pre_train(self, path):
self.newdata = load_metadata(path)
last_idx = self.embedded.shape[0]
embedded = np.zeros((self.metadata.shape[0] + self.newdata.shape[0], 128))
embedded[:self.embedded.shape[0]] = self.embedded
self.embedded = embedded
print(self.newdata.shape)


class FaceThread(QRunnable):
def run(self):
print("Start pre train")
self.worker.pretrain(self.path)
print("Training ")
self.worker.train()
print("Finish Train")

# main
self.thread = FaceThread()
self.thread.setPath(self.img_url)
self.thread.setWorker(self.worker)
QThreadPool.globalInstance().start(self.thread)


I use print function, find the thread really start execute, but after several seconds, the program will exit without any message. Who can help me explain about this? Is it too complicated about the sub thread? :)










share|improve this question









New contributor




LuoNet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • please provide a Minimal, Complete, and Verifiable example

    – S. Nick
    14 hours ago











  • sorry about the unclear edition, It will just output "start pre train". But when it go into worker.pretrain(), the program will exit(). (So, could it provide enough message about the issue?)

    – LuoNet
    13 hours ago











  • @LuoNet Have you created an eventloop with QCoreApplication, QGuiApplication or QApplication ?, the cause of the error could be many so if you want help you should provide an Minimal, Complete, and Verifiable example

    – eyllanesc
    9 hours ago














0












0








0


0






 def pre_train(self, path):
self.newdata = load_metadata(path)
last_idx = self.embedded.shape[0]
embedded = np.zeros((self.metadata.shape[0] + self.newdata.shape[0], 128))
embedded[:self.embedded.shape[0]] = self.embedded
self.embedded = embedded
print(self.newdata.shape)


class FaceThread(QRunnable):
def run(self):
print("Start pre train")
self.worker.pretrain(self.path)
print("Training ")
self.worker.train()
print("Finish Train")

# main
self.thread = FaceThread()
self.thread.setPath(self.img_url)
self.thread.setWorker(self.worker)
QThreadPool.globalInstance().start(self.thread)


I use print function, find the thread really start execute, but after several seconds, the program will exit without any message. Who can help me explain about this? Is it too complicated about the sub thread? :)










share|improve this question









New contributor




LuoNet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












 def pre_train(self, path):
self.newdata = load_metadata(path)
last_idx = self.embedded.shape[0]
embedded = np.zeros((self.metadata.shape[0] + self.newdata.shape[0], 128))
embedded[:self.embedded.shape[0]] = self.embedded
self.embedded = embedded
print(self.newdata.shape)


class FaceThread(QRunnable):
def run(self):
print("Start pre train")
self.worker.pretrain(self.path)
print("Training ")
self.worker.train()
print("Finish Train")

# main
self.thread = FaceThread()
self.thread.setPath(self.img_url)
self.thread.setWorker(self.worker)
QThreadPool.globalInstance().start(self.thread)


I use print function, find the thread really start execute, but after several seconds, the program will exit without any message. Who can help me explain about this? Is it too complicated about the sub thread? :)







python multithreading pyqt






share|improve this question









New contributor




LuoNet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




LuoNet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 9 hours ago









eyllanesc

83.8k103562




83.8k103562






New contributor




LuoNet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 14 hours ago









LuoNetLuoNet

42




42




New contributor




LuoNet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





LuoNet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






LuoNet is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • please provide a Minimal, Complete, and Verifiable example

    – S. Nick
    14 hours ago











  • sorry about the unclear edition, It will just output "start pre train". But when it go into worker.pretrain(), the program will exit(). (So, could it provide enough message about the issue?)

    – LuoNet
    13 hours ago











  • @LuoNet Have you created an eventloop with QCoreApplication, QGuiApplication or QApplication ?, the cause of the error could be many so if you want help you should provide an Minimal, Complete, and Verifiable example

    – eyllanesc
    9 hours ago


















  • please provide a Minimal, Complete, and Verifiable example

    – S. Nick
    14 hours ago











  • sorry about the unclear edition, It will just output "start pre train". But when it go into worker.pretrain(), the program will exit(). (So, could it provide enough message about the issue?)

    – LuoNet
    13 hours ago











  • @LuoNet Have you created an eventloop with QCoreApplication, QGuiApplication or QApplication ?, the cause of the error could be many so if you want help you should provide an Minimal, Complete, and Verifiable example

    – eyllanesc
    9 hours ago

















please provide a Minimal, Complete, and Verifiable example

– S. Nick
14 hours ago





please provide a Minimal, Complete, and Verifiable example

– S. Nick
14 hours ago













sorry about the unclear edition, It will just output "start pre train". But when it go into worker.pretrain(), the program will exit(). (So, could it provide enough message about the issue?)

– LuoNet
13 hours ago





sorry about the unclear edition, It will just output "start pre train". But when it go into worker.pretrain(), the program will exit(). (So, could it provide enough message about the issue?)

– LuoNet
13 hours ago













@LuoNet Have you created an eventloop with QCoreApplication, QGuiApplication or QApplication ?, the cause of the error could be many so if you want help you should provide an Minimal, Complete, and Verifiable example

– eyllanesc
9 hours ago






@LuoNet Have you created an eventloop with QCoreApplication, QGuiApplication or QApplication ?, the cause of the error could be many so if you want help you should provide an Minimal, Complete, and Verifiable example

– eyllanesc
9 hours ago













0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






LuoNet is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55280124%2fpyqt5-after-starting-new-thread-the-main-thread-exit%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








LuoNet is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















LuoNet is a new contributor. Be nice, and check out our Code of Conduct.












LuoNet is a new contributor. Be nice, and check out our Code of Conduct.











LuoNet is a new contributor. Be nice, and check out our Code of Conduct.














Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55280124%2fpyqt5-after-starting-new-thread-the-main-thread-exit%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현