MESSAGE
DATE | 2016-12-21 |
FROM | Ruben Safir
|
SUBJECT | Subject: [Learn] (fwd) Threads and Object Methods
|
From learn-bounces-at-nylxs.com Wed Dec 21 17:20:26 2016 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: from www.mrbrklyn.com (www.mrbrklyn.com [96.57.23.82]) by mrbrklyn.com (Postfix) with ESMTP id DAC80161319; Wed, 21 Dec 2016 17:20:25 -0500 (EST) X-Original-To: learn-at-nylxs.com Delivered-To: learn-at-nylxs.com Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by mrbrklyn.com (Postfix) with ESMTP id 50DD9160E77 for ; Wed, 21 Dec 2016 17:20:23 -0500 (EST) Received: from panix3.panix.com (panix3.panix.com [166.84.1.3]) by mailbackend.panix.com (Postfix) with ESMTP id 3BE5C13F28 for ; Wed, 21 Dec 2016 17:20:23 -0500 (EST) Received: by panix3.panix.com (Postfix, from userid 20529) id 241AE2EB50; Wed, 21 Dec 2016 17:20:23 -0500 (EST) From: Ruben Safir To: learn-at-nylxs.com User-Agent: tin/2.2.1-20140504 ("Tober an Righ") (UNIX) (NetBSD/6.1.5 (i386)) Message-Id: <20161221222023.241AE2EB50-at-panix3.panix.com> Date: Wed, 21 Dec 2016 17:20:23 -0500 (EST) Subject: [Learn] (fwd) Threads and Object Methods X-BeenThere: learn-at-nylxs.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: learn-bounces-at-nylxs.com Sender: "Learn"
-- forwarded message -- Path: reader1.panix.com!panix!not-for-mail From: ruben safir Newsgroups: comp.lang.c++ Subject: Threads and Object Methods Date: Sun, 18 Dec 2016 04:48:58 -0500 Organization: PANIX Public Access Internet and UNIX, NYC Lines: 19 Message-ID: NNTP-Posting-Host: www.mrbrklyn.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: reader1.panix.com 1482054538 5746 96.57.23.82 (18 Dec 2016 09:48:58 GMT) X-Complaints-To: abuse-at-panix.com NNTP-Posting-Date: Sun, 18 Dec 2016 09:48:58 +0000 (UTC) X-Mozilla-News-Host: news://news.panix.com:119 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 Xref: panix comp.lang.c++:1126107
Why can't the threads library handle object methods that are not static to the class
such as std::thread paint(read_chunk); paint.detach();
where read_chunk is an method of an object of class Images.
| gcc -M *.cpp >make.deps || g++ -Wall -ggdb -pg -pthread -o png_proj.o -c png_proj.cpp || png_proj.cpp: In member function ?void png_proj::Image::read_chunk()?: png_proj.cpp|160 col 32| error: invalid use of non-static member function ?void png_proj::Image::read_chunk()? || std::thread paint(read_chunk); || ^ png_proj.cpp|109 col 7| note: declared here || void Image::read_chunk ( ) -- end of forwarded message -- _______________________________________________ Learn mailing list Learn-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/learn
|
|