From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: make-thread with lambda form instead of function symbol Date: Sun, 16 Apr 2017 21:46:35 -0400 Message-ID: References: <87efws9w3c.fsf@ericabrahamsen.net> <87bmrvu9am.fsf@ericabrahamsen.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1492393613 19408 195.159.176.226 (17 Apr 2017 01:46:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Apr 2017 01:46:53 +0000 (UTC) Cc: Emacs developers To: Eric Abrahamsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 17 03:46:43 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1czvkY-0004qD-NO for ged-emacs-devel@m.gmane.org; Mon, 17 Apr 2017 03:46:42 +0200 Original-Received: from localhost ([::1]:34269 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czvkd-0004dz-3k for ged-emacs-devel@m.gmane.org; Sun, 16 Apr 2017 21:46:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czvkT-0004cu-Kg for emacs-devel@gnu.org; Sun, 16 Apr 2017 21:46:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czvkS-0002TK-V1 for emacs-devel@gnu.org; Sun, 16 Apr 2017 21:46:37 -0400 Original-Received: from mail-oi0-x232.google.com ([2607:f8b0:4003:c06::232]:36297) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1czvkS-0002Sn-Or for emacs-devel@gnu.org; Sun, 16 Apr 2017 21:46:36 -0400 Original-Received: by mail-oi0-x232.google.com with SMTP id r203so130038313oib.3 for ; Sun, 16 Apr 2017 18:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=HK8Pa2Olw0BHO5eibmq9UqcCQmFn9/6BUaouCb3NzgI=; b=ZCq7O1IYx7TwsB8uQqPS2+VC7cW4BLWx925bgnTEyIZn84XlC7amYV554AFCTQiErY 3+5Je5D3p/E+ELm7SpAV5+u+nWFZ23dImWnQ7DByTUOELjmv2mYJWwDwtCuQWJRz5165 1d/CGE4GZ0LcvI2kjOzK4EcDILXpbVmmvJ+6Sy39j+oCXaLxOpw/UmI2jV8ezOJJtT6Q tQBFEFeo7B1WYmWmZr+aS5yMe/06UGIiKOxYgS42ko7gzkgz3TlCQR2Gbht7ckvt+Yz8 OVrpo1EBVEQ+cHIp32Tl9GjoRX9tRW5X3Ths7G68zpg703xAG0Eo4o0S3BOblwU1ddFa 4vWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=HK8Pa2Olw0BHO5eibmq9UqcCQmFn9/6BUaouCb3NzgI=; b=bBp319jFmgk+HwQt+30dCru73G8IE+R3qf4v50SauvIUqTRUbL5792pYiYJithktev rFlWIjN65ngRzmCN/ENoKzGQm5GNBI/7PQ5N2l8Hypxp+LJrXwZuxr/mARMipvJTJPv7 7FI0qQjOERvdZ+5tohjTQrWbGhkR+t/0ycJiswAZbdPnFJZf9ehLz4VCvmWKgIDXQzoe 9gSQNhpkYsxv2jz98/m8EGA0nIfjFGakqy8Ty6YcclHyvs84QjJ0eCecBefVjv1BoFdA I0sb5YSTiPhbkDDovEYxEuQ/76dQi+2aKKst4rd8U2u2yCsFddCjfrpC8WuU7xZlQOtd 461g== X-Gm-Message-State: AN3rC/58JEQ5blftwqxI12VDNnv7uyeUT8ii/u25A0pkvKES/xu5zHZj D38VdUgc6dkhSw5JwWC52gdypvjbNg== X-Received: by 10.202.235.196 with SMTP id j187mr1752735oih.167.1492393595880; Sun, 16 Apr 2017 18:46:35 -0700 (PDT) Original-Received: by 10.157.9.178 with HTTP; Sun, 16 Apr 2017 18:46:35 -0700 (PDT) In-Reply-To: <87bmrvu9am.fsf@ericabrahamsen.net> X-Google-Sender-Auth: 6IbTgoNvjPgnwhp93drIgeBwrDY X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214038 Archived-At: On Sun, Apr 16, 2017 at 9:12 PM, Eric Abrahamsen wrote: > > (defun nnir-run-query (specs) > (let* ((results []) > (threads > (mapcar > (lambda (x) > (let* ((server (car x)) > (search-engine (nnir-server-to-search-engine server))) > (make-thread > (lambda () > (setq results > (vconcat > (nnir-run-search > search-engine > server > (cdr (assq 'nnir-query-spec specs)) > (cadr x)) > results)))))) > (cdr (assq 'nnir-group-spec specs))))) > (mapc #'thread-join threads) > results)) > > I'm testing with a single IMAP server query (ie, only one thread is > being created). The nnir-run-search function for the IMAP backend ends > up calling nnimap-send-command--> nnimap-wait-for-response--> > nnheader-accept-process-output--> accept-process-output, so I'm > expecting that's where the thread yields. > > I'm attaching the traceback here. Dunno if it's something I've done > wrong... > #4 0x000000000069f953 in Faccept_process_output (process=..., seconds=..., millisec=..., just_this_one=...) at process.c:4566 Is line process.c:4566 this one? error ("Attempt to accept output from process %s locked to thread %s", SDATA (proc->name), SDATA (XTHREAD (proc->thread)->name)); I guess that indicates you might be doing something wrong (though obviously Emacs shouldn't be crashing)