FSMountServerVolumeAsync() in multiple threads?
site_archiver@lists.apple.com Delivered-To: macnetworkprog@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=F2jLEsA51P7su2qGu5guS4G1Px9GdQSifwjYCFPNu8M=; b=xP1Z1Af9e4iD0FYro8wvjPiCBwQ4kAuvyYy4vbURYyC8v3PgdN/K6kHtJJt59ggeRI szc/yUHFBAaQFwcM5HSJR0uizYsbfYPWesyHWFURW25QrDVau/QFz0lJdUDNLZpIAEuA DXCNXXxzxaMKU86wuVAQR+ujaM+1LvTe20cVM= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=vfxXQnEqBVovV+XPhJ34u1aUbpMy0rdlSZuTR9nLu+mTJVeEhg5Rm8HP/Ygkbe0E0a BUWxoHBbOTTTlOSQDSCbZMIv9Mgr5IbvaRnVhbUayoR7avji594DEx9+MKAcrXSmDinA ATTK5L3yTqgGn3xCRS9LaYo+VMkDgMH7oEkwI= I have an application where I'm trying to mount multiple volumes in their own thread using FSMountServerVolumeAsync(). The application is Cocoa-based. So, I use: [NSThread detachNewThreadSelector:@selector(mountResource:) toTarget:self withObject:aResource] to spawn each thread. The call to FSMountServerVolumeAsync() looks like this: Result = FSMountServerVolumeAsync((CFURLRef)urlOfVolumeToMount, NULL, (CFStringRef)[aResource username], (CFStringRef)[aResource password], volumeOp, aResource, 0, mountUPP, CFRunLoopGetCurrent(), CFSTR("MyMountMode")); As you can tell, I'm using a callback. It handles certain aspects of what is returned. When, I have only one thread, things work fine; the callback is called and the volume is mounted. When I have more than one volume to mount (ergo, more than one thread is calling FSMountServerVolumeAsync()) varying results are produced. For example, the return code from FSMountServerVolumeAsync() might be -50. Or there might be an exception (EXC_BAD_ACCESS) in one of the functions that FSMountServerVolumeAsync() calls (e.g. TAFPSession::AFPLogout). Has anyone had success using FSMountServerVolumeAsync() in this manner? Is there a better approach to FSMountServerVolumeAsync()'s usage? Thanks, Matt _______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (Macnetworkprog@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/macnetworkprog/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Matt DeFoor